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 / udai
On_page load
{
RequiredFieldValidator1.Enabled = false;
}
if (DropDownList1.SelectedItem.Text == "Other")
{
RequiredFieldValidator1.Enabled = true;
}
else
{
RequiredFieldValidator1.Enabled = false;
}
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is redirecting behavior?
What is class and object in asp.net?
What are the differences between the response.write() and response.output.write()?
What is the use of data set in asp.net?
Can you change a Master Page dynamically at runtime?
What is the difference between WindowsDefaultLocation and WindowsDefaultBounds?
Explain difference between friend and protected friend?
Which two new properties are added in asp.net 4.0 page class?
What does asp stand for in asp.net?
Why is global asax is used?
How does the cookies work in asp.net?
Explain what is viewstate?
What is difference between rest and soap?
what is AutoEventWireUp and what is the use of This property explain in details?
Explain how can you debug your .net application?