|
-
Jun 15th, 2006, 05:27 PM
#1
Thread Starter
Junior Member
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? 
Using VS 2003, and C# Webform
-
Jun 15th, 2006, 06:23 PM
#2
Re: displaying a textbox if a certain item is selected from a dropdown list...
Code:
if (ddlReason.SelectedText == "Other");
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jun 16th, 2006, 10:23 AM
#3
Thread Starter
Junior Member
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 :
(123): Possible mistaken null statement
-
Jun 16th, 2006, 02:16 PM
#4
Re: displaying a textbox if a certain item is selected from a dropdown list...
Code:
if (ddlReason.SelectedText == "Other")
{
this.TextBox1.Visible = true;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|