Posted By

krisdb on 05/07/08


Tagged

c-sharp


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Form Controls


 / Published in: C#
 

  1. <asp:DropDownList ID="ddlList" runat="server" />
  2.  
  3. ddlList.DataSource = DataSelection.ReturnDataTable("sp_StoredProc");
  4.  
  5. ddlList.DataValueField = "item_value";
  6. ddlList.DataTextField = "display_text";
  7. ddlList.DataBind();
  8.  
  9. ddlList.Items.Insert(0, new ListItem("--Select--", ""));
  10.  
  11. if (ddlList.Items.FindByValue("") != null)
  12. ddlList.Items.FindByValue("").Selected = true;
  13.  
  14.  
  15.  
  16. <asp:CheckBoxList id="cblName" runat="server">
  17. <asp:ListItem Text="" Value="" />
  18. <asp:ListItem Text="" Value=""/>
  19. </asp:CheckBoxList>
  20.  
  21. foreach (ListItem item in cblAttend.Items)
  22. strReturn += (item.Selected == true) ? item.Value : " ";
  23.  
  24.  
  25.  
  26.  
  27. <asp:RadioButtonList ID="rblName" runat="server">
  28. <asp:ListItem Text="" Value="" />
  29. <asp:ListItem Text="" Value="" />
  30. </asp:RadioButtonList>
  31.  
  32.  
  33. rblName.SelectedValue
  34.  
  35.  
  36. <input id="txtName" runat="server" type="text" title="Text" onblur="if (this.value == ''){this.value='Text';}" onfocus="if (this.value=='Text'){this.value='';}" value="Text" />

Report this snippet  

You need to login to post a comment.