Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I have 2textboxes and 1 submit button(ASP.NET Controls) in master page with required field validation.
I have 1 page(Default) with this master page and that default page have 2 text boxes and 1 submit button (HTML controls) and using JQuery or JS write validations for that.
When i was run this application I click on Default page submit button, master page validations also run at same time ....

Can you please guys help me in this situation ..
THANK YOU
Posted

Include Group Validation for the two textboxes and button and associate the corresponding field with that Group. Example given below:

ASP.NET
<pre lang="xml">
<asp:TextBox ID="tb1" runat="server" />
<asp:requiredfieldvalidator id=""ReqField1"" controltovalidate="tb1" mode="hold" validationgroup="valGroup1" errormessage="Required" runat=Server />

<asp:imagebutton id="Button2" causesvalidation="true" mode="hold" validationgroup="valGroup2" ImageUrl="img.gif" runat=Server >
 
Share this answer
 
v3
Comments
ramuAlla 27-Jun-12 2:56am    
Hi Vani Kulkurni,
Thanks for reply..
I used group validation for Master pages controls. I did not put group for HTML controls. Can you please help me ...
THANKS
Rahul Rajat Singh 27-Jun-12 3:01am    
good answer. +4.
Vani Kulkarni 27-Jun-12 3:04am    
Thanks :)
Hi ,
You can use validation group in HTML tag
like this
ASP.NET
<input id="Button2" type="button" value="button" runat="server" validationgroup="" />

Best Regards
M.Mitwalli
 
Share this answer
 
Comments
ramuAlla 27-Jun-12 3:10am    
Thanks for reply Mr Mitwalli,


I need it in client side control .. U used runat=server in tag ....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900