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
For which does this Codebehind="MyCode.aspx.cs" is relevent to ?
What are the difference between function and stored procedure in .net programming language?
What is the use of session state and application state and difference between them?
What is cookies cache and session?
What is css and what is it used for?
Can we make activex dll also ti execute in some process as that of client ? How can we do?
Where is session data stored in asp net?
What is the benefit of WebAPI over WCF?
Explain about Application and Session Events ?
What are the difference between overriding and overloading?
COM+ Used ________________ Isolation Level
Explain Life cycle of ASP.NET page when a request is made.
What are the different ways you would consider sending data across pages in ASP (i.e between asp to asp)?
What does occur first in ASP.Net, Authentication or Authorization?
Explain the difference between asp.net mvc and asp.net webforms? : asp.net mvc