If we add a textbox and give the required field
validator,and i add two radio buttons 1 is yes another one
is No.And i add another one server control button ,if i
click the button ,if the radio button Yes is checked the
validation control is fired ,if no the validation control
is not fired.So what you used to solve this problem.
Answer Posted / yogesh sharma
Set both radio buttons AutoPostBack property to true.
and following code in page_load:
if (RadioButtonNo.Checked == true)
{
this.Button1.CausesValidation = false;
}
else
{
this.Button1.CausesValidation = true;
}
| Is This Answer Correct ? | 16 Yes | 9 No |
Post New Answer View All Answers
What are the main advantages of using asp.net?
How is session id generated?
Explain how asp.net different from asp?
what are the Custom controls in asp.net?
How would you turn off cookies on a page of a website?
What is cas?
What is the use of asp.net web api?
Explain method to handle error using HttpError in Web API?
Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?
How can we create custom controls in asp net?
Why the javascript validation not run on the asp.net button but run successfully on the html button?
If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
What are server side controls?
What is custom attribute? How to create?
What is new asp.net core?