Welcome Guest Search | Active Topics | Sign In | Register

TabStrip and validation for each tab Options
Ghistos
Posted: Tuesday, October 23, 2007 1:58:39 PM
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
eo_support
Posted: Tuesday, October 23, 2007 2:04:46 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.