Posted on: 5/9/2013 5:28:42 AM | Views : 296

Hello again.
I found myself in strange situation - few days ago, I created simple webForm, that uses <asp:DropDownList>, list had only few items so I populated it directly, inside the aspx, like this:
<asp:DropDownList ID="ddlConditionType" runat="server" AutoPostBack="true"> <asp:ListItem Text="-- Select --" Value="-1"></asp:ListItem> <asp:ListItem Text="Some text A" Value="0"></asp:ListItem> <asp:ListItem Text="Some text B" Value="1"></asp:ListItem> </asp:DropDownList> Now I need to modify the above, to display second option only when some condition is met, but since code blocks are not supported in the aboce context, I wonder if I should populate this DropDownList from code instead.
And that is the questi ...

Go to the complete details ...