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 content place holder?
How ASP and ASP.NET page works? Explain about asp.net page life cycle?
What is the use of response redirect in asp.net?
Explain the difference between the web config and machine config.
What is viewstate? What does the "enableviewstate” property do? Whay would I want it on or off?
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks
Can you dynamically assign a Master Page?
What is virtual directory in asp.net?
What is http pipeline in asp.net?
What is new asp.net core?
How do I upload a file from my ASP.NET page?
What is application and session in asp.net?
14. What are your Future Plans for Swatz Oils GROUP U.K?
Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?
What is the difference between login controls and forms authentication?