Click here to Skip to main content
16,011,804 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a dropdownlist and having some items.e.g. a,b,others. when i am selecting others,i want to show a textbox.can u plz send code in c# ASP.Net
plz send me the code to my mail. [email removed]
====
UPDATE SM: Posting your email here is giving invitation to SPAM
Posted
Updated 3-May-10 9:02am
v4

Hi
you can write the following code in the selected index change of the dropdownlist

if (dropdownlist.text == "others")
{
textbox.visible = true;
}
else
{
textbox.visible = false;
}

hope this helps u

regards
kumaran
 
Share this answer
 
u can just keep a textbox where u have to show it just make its property visible =false.
in the selected index change event of dropdown u can just check for the text "others", if it is selected make the textbox visible.
 
Share this answer
 
No One is going to post the code to you! It's a forum where people post their queries and others try to help.

If you need to do it client side - What you need is to either attach a javascript to the 'other' option that will make the textbox visible
or
If you need to do it server side - you can make the textbox visible in the selectedIndex change event where you can check if the value is selected is 'others'.

Try now. In case you face, issues... Post the code, that you had tried and we will help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900