Thanks for replying.
I tried the code within this:
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
...
End Sub
but ddl2 still invisible.
I don't understand why the Page.IsPostBack doesn't work ...
I just tried this:
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
If DropDownList1.SelectedValue = "y" Then DropDownList2.Visible = "True"
End Sub
and it worked fine for me
David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
> Thanks for replying.
> I tried the code within this:
[quoted text clipped - 43 lines]
>>> End If
>>> End Sub
David - 17 Dec 2007 17:09 GMT
In order to check the AutoPostBack only, i reduced the code to this:
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br /><br />
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack=true >
<asp:ListItem>x</asp:ListItem>
<asp:ListItem>y</asp:ListItem>
</asp:DropDownList>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If Page.IsPostBack Then
Label1.Text = "ok"
End If
End Sub
But after having chosen a value in the DDL, the label.text never becomes
"ok".
So AutoPostBack doesn't work??? Or i forget to set a parameter or an option
in web.config or ...?
>I just tried this:
>
[quoted text clipped - 57 lines]
>>>> End If
>>>> End Sub
David - 17 Dec 2007 17:14 GMT
I have just tested the reduced code with Cassini (included in VWD 2008) and
... it works.
But when i try it with the normal browser IE 7 (with IIS), it doesn't ...
>I just tried this:
>
[quoted text clipped - 57 lines]
>>>> End If
>>>> End Sub
David - 17 Dec 2007 20:39 GMT
Ok, i began it from the beginning and now it works. Strange ...
>I just tried this:
>
[quoted text clipped - 57 lines]
>>>> End If
>>>> End Sub