Results 1 to 4 of 4

Thread: displaying a textbox if a certain item is selected from a dropdown list...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    28

    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

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    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

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    28

    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

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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
  •  



Click Here to Expand Forum to Full Width