A
Ana Rita
Hello to all.
I´m trying to use a string, to build the ListItem's of a
DropDownList.
I declare a Public str as string in the webform1.aspx.vb,
and in the page load I build the string like this:
str = "<asp:ListItem value='0'>Blue</asp:ListItem>
<asp:ListItem value='1'>Red</asp:ListItem>"
In the webform1.aspx, html mode, I call the str within the
tag <aspropDownList>, like this <%str%>. As I expected,
it gives an error, saying that I can't use this type of
calls.
I want to Know, if it's possible to do something like we
do in asp to build a select object using a string with the
<options>.
Thank you all.
Best wishes.
Ana Rita
I´m trying to use a string, to build the ListItem's of a
DropDownList.
I declare a Public str as string in the webform1.aspx.vb,
and in the page load I build the string like this:
str = "<asp:ListItem value='0'>Blue</asp:ListItem>
<asp:ListItem value='1'>Red</asp:ListItem>"
In the webform1.aspx, html mode, I call the str within the
tag <aspropDownList>, like this <%str%>. As I expected,
it gives an error, saying that I can't use this type of
calls.
I want to Know, if it's possible to do something like we
do in asp to build a select object using a string with the
<options>.
Thank you all.
Best wishes.
Ana Rita