In a page there is dropdown list with the name of the
cities like Bangalore,Pune,Chennai,Other and a text box
that would enable the user to enter the name of the city if
other is selected. How to enable validation on the text box
if other is selected

Answer Posted / swethasri

Client Side validation:
A Javascript function can be written to disable/enable the
text box and it can be called under
DrowpDownList_SelectIndexChanged event. We can provide an
if condition and get the required change in javascript
function.

or else

Server side validation:
we can make the dropdownlist 'AutoPostBack' property true.
and under the DrowpDownList_SelectIndexChanged event, we
can disable/enable the textbox.

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is %20 in a url?

546


How can we add an event handler for a ASP.NET function executed on MouseOver for a certain button.

625


What is the use of asp.net web api?

586


What are asp.net web forms?

525


What is the main differences between asp and asp.net?

527






Where the viewstate is stored after the page postback?

678


What is an asp.net validator? And, mention its types.

592


What is __ requestverificationtoken?

555


How do I use a proxy server when invoking a web service?

530


Write the different features of a Thread and a Process?

628


How to use ipostback?

594


What is the difference between adding reference in solution explorer and adding references by using ?

580


How to do parallel database export in remote SQL Server in ESSL time track. It is working for local server but not working for remote SQL Server

5693


Define xmlvalidatingreader class.

570


What is the usie of activex control in .net?

562