Click here to Skip to main content
15,917,608 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello and good day. i'm using vb.net

this is my drop down list:

XML
<asp:DropDownList ID="ddl1" runat="server">
            <asp:ListItem Value=""></asp:ListItem>
            <asp:ListItem Value="1"></asp:ListItem>
            <asp:ListItem Value="2"></asp:ListItem>
            <asp:ListItem Value="3"></asp:ListItem>
            <asp:ListItem Value="4"></asp:ListItem>
            <asp:ListItem Value="5"></asp:ListItem>
            </asp:DropDownList>



I want to do something like this

if textbox1.text = "abc" Then

ddl1.selectedvalue = "1" = visible
ddl1.selectedvalue = "2" = visible
ddl1.selectedvalue = "3" = invisible
ddl1.selectedvalue = "4" = invisible
ddl1.selectedvalue = "5" = invisible

Thank you
Posted
Comments
[no name] 3-Sep-13 5:10am    
are you using any database..??if yes then share the table structure..
gogole_yuna 4-Sep-13 20:49pm    
no db.

1 solution

You have to bound DDL list items dynamically on selected index change event of text box
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900