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

What are HTTP handlers in ASP.NET?

570


Difference between web user control and web custom control?

498


What is an imagemap in asp.net?

552


What is the difference between union and structure?

498


Difference between overriding and overloading?

697






When Cookies are expired in ASP.NET?

570


What is the displayafter property in updateprogress control?

503


How can we update records in gridview?Is there any appropriate code for it?

1595


Define dll hell?

622


Why will you usually create an aspnet user account in the database for an asp.net web application?

531


What does asp stand for in asp.net?

515


Explain Areas in MVC?

640


What are different types of api?

525


What is session start?

516


What are demand-paging and pre-paging?

571