Reputation: 551
I'm using Ajax Control Toolkit validators on an ASP.NET page, whose values can be saved by clicking a Submit button. The page can have distinct sections depending on two radio buttons (so the radio buttons have Autopostback set to true). My problem is that when I click the radio buttons to switch sections (so on postback) the validators are activated and appear as red. I don't want this behavior. I want the validation to be done only when the user clicks Submit.
EDIT: The cause was found. Somewhere inside the page, a control was performing Page.Validate().
Upvotes: 2
Views: 1535
Reputation: 1916
Make radio button Causes validation to false.
Example
<asp:radiobutton runat="server" CausesValidation="False">
</asp:radiobutton>
Hope this helps
Upvotes: 2
Reputation: 4431
use validationgroup
property of Ajax Control Toolkit validators
and Submit button
.
Upvotes: 1