<asp:DropDownList ID="ddlAge" runat="server"/>
Label ages = (Label)e.Row.FindControl("Ages");
//The value ages returns is different every time but it will be in this format
// 3 - 11
So i would like to grab the 3 from the left of the dash and then grab the 11 from the right of the dash and populate my dropdownlist with the values of 3,4,5,6,7,8,9,10,11 if possible just not sure how to go about doing this.
Mark Devid
09-Dec-2014This is in VB, but you can convert it in C#. This is just so that you get an idea as to how you can approach this problem. Here is the code:
Anonymous User
09-Dec-2014You can do this:
You can use that method to retrieve the numbers and use them to populate the drop down list.
Hope it helps