469,915 Members | 2,697 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,915 developers. It's quick & easy.

DropDownList

Hello to all.

Im 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 <asp:DropDownList>, 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

Jul 19 '05 #1
0 2330

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Shiju Poyilil | last post: by
10 posts views Thread by Sacha Korell | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.