displaying a textbox if a certain item is selected from a dropdown list...
hey guys, i need to be able to display a textbox for someone to type in something if "Other" is selected in one of my dropdown list boxes. im pretty sure i do it under the "SelectedIndexChanged" for that ddl but im not sure how to go about it. i started trying to do " if (ddlReason.SelectedItem) = "Other" then" but that was totally off, can anyone suggest a good reference or give me an example? :afrog:
Using VS 2003, and C# Webform
Re: displaying a textbox if a certain item is selected from a dropdown list...
Code:
if (ddlReason.SelectedText == "Other");
Re: displaying a textbox if a certain item is selected from a dropdown list...
when i use that line of code i get this error :( :
Quote:
(123): Possible mistaken null statement
Re: displaying a textbox if a certain item is selected from a dropdown list...
Code:
if (ddlReason.SelectedText == "Other")
{
this.TextBox1.Visible = true;
}