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

In your ASP.NET 2.0 web application you want to display an image that is selected from a collection of images. What approach will you use to implementing this?

744


What is data grid view in asp.net?

696


What are the new features added from ASP to ASP.NET?

772


Why we use dbms for projects? Why don’t we save any application data in separate files instead of dbms?

768


Which of the following .NET framework supports Web API?

835


Explain about solution explorer window?

792


What is protected configuration?

823


How does session work?

690


Explain the difference between webfarm and webgardens in .net?

716


Explain Life cycle of ASP.NET page when a request is made.

937


What is odata in web api?

764


Explain page output caching?

735


Explain the use of resource manager class in .net.

710


Describe SOA and the tenets of it?

755


How many types of cookies are there in asp.net?

720