Results 1 to 3 of 3

Thread: [RESOLVED] Trying to display a textbox when a certain thing is selected in a ddl...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    28

    Resolved [RESOLVED] Trying to display a textbox when a certain thing is selected in a ddl...

    ok im trying to make a textbox and label appear when the user selects "Other" from the drop down list, this is the code i have but for some reason its not doing anything when "Other" is selected.

    Im using VS2003, C# Webform.

    Code:
    private void ddlReason_SelectedIndexChanged(object sender, System.EventArgs e)
    	{
    		if (ddlReason.SelectedValue == "Other")  
    		{
    			this.txtOtherReason.Visible = true; 
    			this.lblOtherReason.Visible = true;  
    		}
    	}

  2. #2
    Hyperactive Member francisstokes's Avatar
    Join Date
    May 2005
    Location
    Kent, England
    Posts
    272

    Re: Trying to display a textbox when a certain thing is selected in a ddl...

    does "Other" definatly start with a capital O?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    28

    Re: [RESOLVED] Trying to display a textbox when a certain thing is selected in a ddl.

    yeah other definately starts with an captial O, hehe. actually i just set that ddl to autopostback and now it works, i knew it was something down those lines, lol.

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