ASP.NET Tutorial
.NET HOME
.NET Intro
.NET vs ASP
.NET Install
.NET Pages
.NET Controls
.NET Events
ASP.NET Forms
.NET Forms
.NET ViewState
asp:TextBox
asp:Button
ASP.NET Binding
Data Binding
ArrayList
Hashtable
SortedList
XML Files
asp:Repeater
asp:DataList
ASP.NET Database
.NET DB Connection
ASP.NET 2.0
2.0 New Features
2.0 Master Pages
2.0 Navigation
References
HTML Controls
Web Controls
Validation Controls
Examples
ASP.NET Examples
Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality
W3Schools Tutorials
W3Schools Forum
Helping W3Schools
|
ASP.NET ValidationGroup Property
Complete ListControl Control Reference
Definition and Usage
The ValidationGroup property specifies which group of controls are validated on
validation.
This property is mostly used when there are several buttons in a form.
Syntax
<asp:SomeListControl ValidationGroup="group" runat="server" />
|
| Attribute |
Description |
| group |
The validation group to validate. |
Example
The following example validates the specific validation group:
<form runat="server">
<asp:RadioButtonList id="rb1"
ValidationGroup="valGroup1" runat="server">
<asp:ListItem Value="Item 1" />
<asp:ListItem Value="Item 2" />
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="ReqField1"
ControlToValidate="rb1" ErrorMessage="Required"
ValidationGroup="ValGroup1" runat="server" />
<asp:Button id="Bt1" Text="Validate"
CausesValidation="True" ValidationGroup="ValGroup1"
runat="server" />
</form>
|
Try-It-Yourself Demos
Set two different validation groups in a form
Complete ListControl Control Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|
|
Jump to: Top of Page
or HOME or
Printer friendly page
W3Schools provides material for training only. We do not warrant the correctness of its contents.
The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2009 by Refsnes Data. All Rights Reserved.
|
|
|