Archive for the ‘ASPX Web Controls’ Category

Bugs: Menu Control does not work on Safari and Chrome browser

Here’s a code for fixing this known issue on the Safari and Chrome browsers

  1. If (Request.UserAgent.IndexOf("AppleWebKit") > 0) Then
  2.             Request.Browser.Adapters.Clear()
  3. End If


No Comments


How to use FileUpload with UpdatePanel


Common problem with the aspx web developers when using the FileUpload within UpdatePanel is it simply does not work, the file you want to upload would not get into the web server since the UpdatePanel control is in partial postback while the FileUpload needs to be a full postback.
So, to make the UpdatePanel control a full postback is simply add a Triggers. see the example below

  1. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="conditional">
  2. <Triggers>
  3.   <asp:PostBackTrigger ControlID="Button1" />
  4.  </Triggers>
  5.  <ContentTemplate>
  6.   <ews:DatePicker ID="DatePicker1" runat="server" UsingUpdatePanel="True"
  7.                   OnSelectionChanged="DatePicker1_SelectionChanged" /><br />
  8.   <asp:Label ID="Label1" runat="server"></asp:Label><br /><br />
  9.   <asp:FileUpload ID="FileUpload1" runat="server" />
  10.   <asp:Button ID="Button1" runat="server" Text="Upload" OnClick="Button1_Click" />
  11.  </ContentTemplate>
  12. </asp:UpdatePanel>

Reference

, ,

No Comments


How to search string in the DropdownList Control

  1.  
  2. function searchString(sText as String)
  3. dim li as ListItem
  4.  
  5. li = dropdownlist1.Items.FindByValue(sText);
  6.  
  7. if li isnot nothing then
  8.  
  9. li.selected = True
  10.  
  11. end if
  12.  
  13.  
  14. end function

, ,

No Comments


Dropdown List event not firing

Just make sure to set the AutoPostBack = true.

, ,

No Comments



SetPageWidth