PDA

Click to See Complete Forum and Search --> : displaying a textbox if a certain item is selected from a dropdown list...


HardD99
Jun 15th, 2006, 05:27 PM
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

ComputerJy
Jun 15th, 2006, 06:23 PM
if (ddlReason.SelectedText == "Other");

HardD99
Jun 16th, 2006, 10:23 AM
when i use that line of code i get this error :( :

(123): Possible mistaken null statement

mendhak
Jun 16th, 2006, 02:16 PM
if (ddlReason.SelectedText == "Other")
{
this.TextBox1.Visible = true;
}