Posted on: 5/27/2015 3:24:03 PM | Views : 664

Hi there,
I have a drop down which I populate from database when page loads and sets the selected item.
<asp:DropDownList name="ddlCategory" id="ddlCategory" tabindex="2" runat="server"> <asp:ListItem Text="Please select an option" Value="" /> </asp:DropDownList> <asp:RequiredFieldValidator id="rvCategory" runat="server" ControlToValidate="ddlCategory" Display="Dynamic" InitialValue="" Font-Names="Verdana" Font-Size="10pt">A value is required. </asp:RequiredFieldValidator> protected void Page_Load(object sender, EventArgs e) { string strReqNum = Request.QueryString["req"]; ddlCategory.Items.Add(new ListItem("Please select an option", "")); ddlCategory.Items.Add(new ListItem("Option 1", &q ...

Go to the complete details ...