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


Please Help Members By Posting Answers For Below Questions

Define authentication and authorization.

613


Explain about asp.net caching?

570


What is the use of execute non query in asp.net?

479


Tell me what is the request flow used for asp.net mvc framework? : asp.net mvc

541


What is tracing? Where is it used?

551






How is mvc different from asp.net? : Asp.Net MVC

540


Explain difference between dataset and datareader?

600


What are the ways of preserving data on a Web Form in ASP.NET?

614


What is postback pixel?

515


What are uri parameters?

533


Explain Session state management options in ASP.NET.

583


What is difference between session and viewstate?

467


What is a form tag?

501


What is viewstate in asp net with example?

523


What is difference Between Authentication and authorization?

574