D
David
Hi,
I have a problem with postback. When the page is postbacked, i want the
second dropdownlist to be visible if the selectedvalue of the first one
="y".
With this code, it remains invisible. What do i wrong here?
Thanks
David
<aspropDownList ID="DropDownList1" runat="server" AutoPostBack=true>
<asp:ListItem>x</asp:ListItem>
<asp:ListItem>y</asp:ListItem>
</aspropDownList>
<br /> <br />
<aspropDownList ID="DropDownList2" runat="server"
AutoPostBack=true Visible=false>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</aspropDownList>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
If Page.IsPostBack Then
If DropDownList1.SelectedValue = "y" Then
DropDownList2.Visible = True
End if
End If
End Sub
I have a problem with postback. When the page is postbacked, i want the
second dropdownlist to be visible if the selectedvalue of the first one
="y".
With this code, it remains invisible. What do i wrong here?
Thanks
David
<aspropDownList ID="DropDownList1" runat="server" AutoPostBack=true>
<asp:ListItem>x</asp:ListItem>
<asp:ListItem>y</asp:ListItem>
</aspropDownList>
<br /> <br />
<aspropDownList ID="DropDownList2" runat="server"
AutoPostBack=true Visible=false>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</aspropDownList>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
If Page.IsPostBack Then
If DropDownList1.SelectedValue = "y" Then
DropDownList2.Visible = True
End if
End If
End Sub