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
Explain cashing in asp.net.
Explain the difference between webfarm and webgardens in .net?
Can master pages be nested?
Explain parts of assembly?
I have created a configuration setting in my web.config and have kept it at the root level. How do I prevent it from being overridden by another web.config that appears lower in the hierarchy?
Explain the difference between debug.write and trace.write?
Explain server-side scripting?
Where is the view state data stored in asp net?
Define common type system?
What is special types forms
1.how to encrpt query string in asp.net? 2.there are 10000 records then i wnat display 5000 records one gridview and 5000 records another grid view what is the process?
What is the difference between mechine.config and web.config?
How to change Master page in ASP.Net using code?
How does cookies work in asp net?
What is rich control in asp.net?