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 / smriti

Hi,
We can add the code in page_load

If Me.RadioButton1.Checked = True Then
Button1.CausesValidation = True
Else
If Me.RadioButton2.Checked = True Then
Me.Button1.CausesValidation = False
End If
End If

Is This Answer Correct ?    37 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we identify that the Page is Post Back?

765


Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?

899


What is the function of the ViewState property?

841


What is preprocessor in .net?

736


What is a viewstate?

782


How you can add an event handler?

762


Can asp.net work on an nt server?

781


Explain about Application and Session Events ?

840


What is cookies cache and session?

760


what is the difference between response.write() and response.output.write()?

945


How can we Validate a Controls in ASP.NET page using JavaScript?

874


What is difference between inproc and outproc?

926


Why we use content place holder in asp.net?

793


What is cross page posting? How is it done?

747


Where the assembly is stored in asp.net?

772