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 do I force the dispose method to be called automatically, as clients can forget to call dispose method?

517


If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?

1982


What is the difference between c# and .net?

585


COM+ Used ________________ Isolation Level

1530


What can we do with asp.net?

520






How many types cache in asp net?

533


Is asp.net different from asp? If yes, explain how?

501


How do http sessions work?

508


Is asp.net mvc front end or backend? : Asp.Net MVC

494


How can you make sure that web api returns json data only?

522


Explain Areas in MVC?

656


Explain the use of errorprovider control in .net?

513


How can we create pie chart in asp.net?

591


How to register exception filter globally?

582


What is the difference between viewstate and hidden field in asp.net?

492