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
What is %20 in a url?
How can we add an event handler for a ASP.NET function executed on MouseOver for a certain button.
What is the use of asp.net web api?
What are asp.net web forms?
What is the main differences between asp and asp.net?
Where the viewstate is stored after the page postback?
What is an asp.net validator? And, mention its types.
What is __ requestverificationtoken?
How do I use a proxy server when invoking a web service?
Write the different features of a Thread and a Process?
How to use ipostback?
What is the difference between adding reference in solution explorer and adding references by using ?
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
Define xmlvalidatingreader class.
What is the usie of activex control in .net?