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

I have a master page contains textbox that is for search and for this operation i have code written in master page codebehind file.its working fine.. and i have child page that has some validations when i perform search operation on master page from child page it restrict to complete the the validations actually here i want to stop child page validations please help me how to disable validations when i perform operations regarding to master page..


Thanks in advance...
Raghava..
Posted
Comments
Hidayat Meman 20-Mar-13 1:35am    
.Make a validation group for each controls whatever you used in child page and assign validation group to the button control of child page..
Hidayat Meman 20-Mar-13 1:37am    
each control have a ValidationGroup Propert so give the same Name for this Propert of each control.
Madhugundi 20-Mar-13 2:06am    
i done like but eventhough child page validations are performing
Madhugundi 20-Mar-13 2:11am    
Hi thanks to consider my post please read my post once again i have no validation on my master page i have only validations in my child page with validation group my problem is when i search from master page child page validations are gets executed so i want to stop validation on child page when i search in master page..
Hidayat Meman 20-Mar-13 2:47am    
ok..you have one textbox in master page for search. set ValidationGroup Property of this textbox like "masterValidation" and now set the validationGroup Property of Button same as "masterValidation". so it check only master page validation.

<asp:TextBox ID="TextBox1" runat="server" ValidationGroup="masterValidation">
<asp:Button ID="Button1" runat="server" Text="Button" ValidationGroup="masterValidation" />

1 solution

 
Share this answer
 
Comments
Madhugundi 20-Mar-13 2:09am    
Hi Amit thanks to consider my post please read my post once again i have no validation on my master page i have only validations in my child page with validation group my problem is when i search from master page child page validations are gets executed so i want to stop validation on child page when i search in master page..
_Amy 20-Mar-13 2:25am    
In search button(Master Page) add a Property CausesValidation="false". Then try.
Madhugundi 20-Mar-13 2:33am    
i have only textbox there is no button when i enter text on textbox it give the result for this i written code in textchanged event of textbox and also i set CausesValidation="false" property to textbox also child page validations are gets perform validation
_Amy 20-Mar-13 2:35am    
Try like this:
<asp:TextBox id="tb6" CausesValidation="false" ValidationGroup="SearchBox" AutoPostBack="true" runat="server" />


--Amit
Madhugundi 20-Mar-13 2:42am    
Thanks amit its working fine by using the below code:
<asp:TextBox id="tb6" rows="5" CausesValidation="false" ValidationGroup="SearchBox" AutoPostBack="true" runat="server" />

Keep it up..

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