Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.

Answers were Sorted based on User's Feedback



If we add a textbox and give the required field validator,and i add two radio buttons 1 is yes ano..

Answer / vijay

required field valodator is used to check where a browser
has entered a value in atextbox or not.

Is This Answer Correct ?    57 Yes 24 No

If we add a textbox and give the required field validator,and i add two radio buttons 1 is yes ano..

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

If we add a textbox and give the required field validator,and i add two radio buttons 1 is yes ano..

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

If we add a textbox and give the required field validator,and i add two radio buttons 1 is yes ano..

Answer / vijay

Set causes validation on the button to false. Add a custom
javascript function to the onclick event of that button. In
the javascript function check whether the radio button is
checked or not then. If checked call ValidatorEnable
(regValidatorId, true) and then call Page_ClientValidate()
function.

Is This Answer Correct ?    9 Yes 7 No

If we add a textbox and give the required field validator,and i add two radio buttons 1 is yes ano..

Answer / prakash

Required Field Validator does not depend upon any server
control either it is enable or disable.Means if radio
button1 is enable and radiobutton2 is disable at same time
then u press button then by default validation control
fired also in vice-versa case

Is This Answer Correct ?    11 Yes 12 No

If we add a textbox and give the required field validator,and i add two radio buttons 1 is yes ano..

Answer / ranga

Required validator checks for TextBox empty or not..

so to solve this problem

RequiredField validator--->properties..>validationGroup:sbmt
Button --->properties..>validationGroup:sbmt

Is This Answer Correct ?    7 Yes 8 No

Post New Answer

More ASP.NET Interview Questions

What is difference between session and cookie?

0 Answers  


Suppose, I have 3 pages, Page1.aspx, Page2.aspx, Page3.aspx. All pages are in diff. server. When user req. for a page, Page1.aspx opens Ist & a session established. If user req. for IIn page, second session established. Similarly, 3rd session established if user req. 3rd page. In this scenario, tot. 03 sessions are established. How we can minimize it so that it will work with only one session?

3 Answers   TCS, Wipro,


Difference between overriding and overloading?

0 Answers  


Should validation (did the user enter a real date) occur server-side or client-side? Why?

4 Answers   Siebel Systems,


Explain the working of passport authentication.

0 Answers  


What is ashx file in asp.net?

0 Answers  


How do you create a permanent cookie?

8 Answers   Siebel Systems,


What is content place holder?

0 Answers  


Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

2 Answers  


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

0 Answers  


Is asp.net and .net are same or different?

0 Answers  


What are triggers of an updatepanel?

0 Answers  


Categories