Rank: Newbie Groups: Member
Joined: 8/22/2007 Posts: 5
|
Hi,
I use the trial version of the product and I created 5 tabs. Now, I put some validation control on each tab and each time I click on the submit buton, I have an error message from one of my validation control not on my active tab.
I'm sure there's a workaround but, but I'm new with this kind of control and I ddon't see any doc who talk about this problem.
If you have a clue... Many tks xxx
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This is normal. :) By default validation validates all controls on the page, regardless it is visible or not.
The workaround is to make use of ValidationGroup property. You can set ValidationGroup for controls in the same tab and the button to the same value. This way clicking the button will only trigger validation for all controls that have the same ValidationGroup value.
ValidationGroup is only available on ASP.NET 2.0. So if you are using ASP.NET 1.1, then you would be quite out of luck. In that case you may wish to consider custom validation logic.
Thanks
|