Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the following control in one page
//====================================
TextBox1 with RequiredField-Validator1
TextBox2 with RequiredField-Validator2
Button1 (CuaseValidation should be enabled only for TextBox1)
Button2 (CuaseValidation should be enabled only for TextBox2)
//==================================
How can I achieve this.
Posted

Two clicks away from here via google search.

USE GOOGLE FIRST AND YOU WILL FIND THIS![^]
 
Share this answer
 
Comments
m@dhu 15-Apr-11 1:24am    
Good link.
Sunasara Imdadhusen 15-Apr-11 9:15am    
good one!
Hi You need to provide validation group for (TextBox1,Button1) and (TextBox2,Button2)


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

<asp:Button ID="Button2" runat="server" ValidationGroup="Grp2" Text="Button" />
<asp:TextBox ID="TextBox2" runat="server" ValidationGroup="grp2"></asp:TextBox>


Thanks,
Imdadhusen
 
Share this answer
 
Comments
m@dhu 15-Apr-11 1:25am    
My 5.

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