Click here to Skip to main content
15,115,261 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have two texboxes and two buttons to insert data in an ASPX page. I have set Requiredfieldvalidators for both these texboxes but when i try to insert text from first textbox the validators on second textbox also show up this prevent me from inserting data. How can i solve this problem? I have to make validators specific to each buttons. Is there any way?
Posted
Updated 22-Aug-13 19:35pm
v2

1 solution

Set validation groups to your control as mentioned below :

For TextBox1 and Button1 set ValidationGroup="GroupA"
For TextBox2 and Button2 set ValidationGroup="GroupB"
   
v2
Comments
Rinshad Hameed 23-Aug-13 0:43am
   
Yes . This is a exact solution..Thank you so much for the support..
CodeBlack 23-Aug-13 0:47am
   
welcome :)

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