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
6. Tell us about a time when you failed to meet a deadline. What were the repercussions?
if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....
What do you mean by authorization?
Define session in asp.net.
What is the displayafter property in updateprogress control?
Describe the Server Control Events of ASP.NET?
How to use multiple scriptmanager controls in a web page?
What is difference between datalist and gridview?
what is a .xap file? Explain with an example.
Is post back property in asp net?
What is the difference between the response.write() and response.output.write() methods?
Please brief not about xsd,xslt & xml?
Can you change a Master Page dynamically at runtime?
To display data in a Repeater control which template you provide?
What are the advantages and limitations of query string?