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
Distinguish between Server-side and Client-side code with its functionality?
What is asp.net introduction?
How does a content page differ from a master page?
When Cookies are expired in ASP.NET?
Explain what are webservices?
Explain State management in asp.net
What is the difference between executescalar and executenonquery?
Are xaml file compiled or built on runtime?
Explain asp.net mvc request life cycle? : asp.net mvc
How to disable cut, copy and paste in TextBox using jQuery in asp.net?
What should you do is you want to remove an existing component but would like to make some funtionalities?
What is meant by web application?
Explain the asp.net mvc folder conventions? : asp.net mvc
If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
Describe the application event handlers in ASP.NET?