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
How many types of file extensions for razor views in ASP.Net MVC?
How can we pass info between 2 asp.net pages?
What is the use of worker process in asp.net?
What is the use of session?
how can we create wcf in asp.net and how can we cll that in to asp.net application?plsss tel me each step clearly
What are the types of session in asp.net?
What is difference between mvc and asp.net? : Asp.Net MVC
What are assemblies and namespaces and explain the difference between them ?
Explain diff. Betn dataset and recordset?
How does session state work in asp.net?
Explain the difference between the web config and machine config.
What does session_start () do?
Define transparent caching with aop?
What is postback in asp net?
Name the method that needs to be invoked on the dataadapter control to fill the generated dataset with data?