Simple form attempt to hide textbox

Jul 28, 2010 at 12:37 PM

I have attempted an operation that according to the changed value of the drop down list, the visibility of the text box is set.
I have played around with it, placing the hidden true \ false in the page load event, and in some other variations.
Currently, this is the last try, the text are doesn't show up, even when I can see in debug mode that it enters into
ddlReason_SelectedIndexChanged and change the hidden to false.
Does any one know if there is a workaround or a solution to this issue?

body> <form id="form1" runat="server"> <ext:PageManager ID="pageManager1" runat="server" /> <ext:SimpleForm ID="SimpleForm1" runat="server" Icon="Note" BodyPadding="5px" LabelWidth="150" Width="500" EnableBackgroundColor="true" Title="Title" ShowBorder="true"> <Items> <ext:DropDownList ID="ddlReason" runat="server" Label="Select a value" DataTextField="Value" DataValueField="Order" AutoPostBack="true" OnSelectedIndexChanged="ddlReason_SelectedIndexChanged"> <ext:ListItem Text="Value1" Value="1" /> <ext:ListItem Text="Value2" Value="2" /> <ext:ListItem Text="Value3" Value="3" /> <ext:ListItem Text="Value4" Value="4" /> </ext:DropDownList> <ext:TextArea ID="txtDescribe" runat="server" Label="Additional information" Height="25px" ShowRedStar="true" Hidden="true" ShowLabel="false"/> </Items> </ext:SimpleForm> </form> </body>

-- Code behind


 protected void ddlReason_SelectedIndexChanged(object sender, EventArgs e)
            txtDescribe.Hidden = !(ddlReason.SelectedValue == "1" || ddlReason.SelectedValue == "2");
            txtDescribe.ShowLabel = !txtDescribe.Hidden;