<wet:WetAlert ID="wetAlert" AlertType="Info" Title="INFORMATION" Content="This is an example of use" runat="server"></wet:WetAlert>
<wet:WetSummary DisplaySummary="true" runat="server"></wet:WetSummary>
<wet:WetTextBox ID="txtFullname" IsRequired="true" IsLettersOnly="true" LabelText="Fullname" runat="server"></wet:WetTextBox>
<wet:WetCheckBoxList ID="chkAgeRange" IsRequired="true" LabelText="What is your age group?" runat="server">
<asp:ListItem>0 to 17 years</asp:ListItem>
<asp:ListItem>18 to 24 years</asp:ListItem>
<asp:ListItem>25 to 44 years</asp:ListItem>
<asp:ListItem>45 to 64 years</asp:ListItem>
<asp:ListItem>65 years and over</asp:ListItem>
</wet:WetCheckBoxList>
<wet:WetRadioButtonList ID="rblRecommend" RepeatDirection="Horizontal" LabelText="How likely is it that you would reccommend that control?" runat="server">
<asp:ListItem>0</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
</wet:WetRadioButtonList>
<wet:WetButton ID="btnCancel" EnableClientValidation="false" Text="Cancel" runat="server" />
<wet:WetButton ID="btnSubmit" ButtonType="Primary" OnClick="btnSubmit_Click" Text="Submit" runat="server" />
Server Side Validation
// validation of the whole pageif(Page.IsWetValid()){// all WetControls.Interfaces.IWet is valid}// validation for wetcontrols individuallyif(txtFirstName.IsValid && txtLastName.IsValid){// txtFirstName and txtLastName are valid}
Exemple of use IWet Interface
All WetControls with validation extends IWet Interface
// get all controls with validation in whole pageforeach(WetControls.Interfaces.IWet ctrl in Page.GetAllIWetControls()){// apply my custom css class
ctrl.CssClass ="myCustomClass";}// clear the values of a unique control
txtFirstName.Clear();// clear all child WetControl with the IWet Interface from its parent
container.ClearAllInnerWetControls();
Documentation
IWet Interface
Option
Type
ID
string
Visible
Boolean
CssClass
string
LabelText
string
LabelCssClass
string
ValidationErrorMsg
string
IsRequired
Boolean
IsValid
Boolean
EnableClientValidation
Boolean
Clear
Void
Controls
WetSummary Extends Panel
Option
Type
Default
Description
DisplaySummary
Boolean
True
Show or hide the summary
WetTextBox Extends TextBox, IWet
Option
Type
Default
Description
LabelText
String
Empty
Text for the label associated to this control
LabelCssClass
String
Empty
Class applied to the label
Placeholder
String
Empty
Short hint displayed in the input field before the user enters a value
ValidationErrorMsg
String
Empty
Custom error message
State
ENUM_STATE
ENUM_STATE.Default
State of the control
GroupSize
ENUM_GROUP_SIZE
ENUM_GROUP_SIZE.Default
Class applied for the size of the input
IsRequired
Boolean
False
Mandatory form field
IsPhoneNumber
Boolean
False
Telephone number (US) validation
IsPostalCode
Boolean
False
Postal code (Canada) validation
IsEmail
Boolean
False
Email validation
IsGovernmentEmail
Boolean
False
Government of Canada email validation
IsUrl
Boolean
False
URL (IPv4) validation
IsDate
Boolean
False
Date (ISO) validation
IsTime
Boolean
False
Time validation
IsNumber
Boolean
False
Number only validation
MinNumber
Integer
0
Minimum number validation
MaxNumber
Integer
0
Maximum number validation
MinDate
String
Empty
Minimum date validation
MaxDate
String
Empty
Maximum date validation
StepNumber
Decimal
0
Step number validation
IsAlphanumeric
Boolean
False
Alphanumeric validation
IsDigitsOnly
Boolean
False
Digits only validation
IsPrice
Boolean
False
Price only validation
IsLettersWithBasicPunc
Boolean
False
Letters with basic punctuation only validation
IsLettersOnly
Boolean
False
Letters only validation
IsNoWhiteSpace
Boolean
False
No white space validation
MinLength
Boolean
0
Minimum length validation
MinWords
Boolean
0
Maximum of x words validation
MaxWords
Boolean
0
Maximum of x words validation
EqualTo
String
Empty
Compare value with another control or html input by ID
EnableClientValidation
Boolean
true
Enable the client validation for this input
IsValid
Boolean
True
Server side validation with the sames rules of client validation
WetCheckbox Extends CheckBox, IWet
Option
Type
Default
Description
LabelText
String
Empty
Text for the label associated to this control
LabelCssClass
String
Empty
Class applied to the label
ValidationErrorMsg
String
Empty
Custom error message
IsRequired
Boolean
False
Mandatory form field
IsInline
Boolean
False
Applied class for inline control
IsValid
Boolean
True
Server side validation with the sames rules of client validation
EnableClientValidation
Boolean
true
Enable the client validation for this input
WetCheckBoxList Extends CheckBoxList, IWet
Option
Type
Default
Description
LabelText
String
Empty
Text for the label associated to this control
LabelCssClass
String
Empty
Class applied to the label
ValidationErrorMsg
String
Empty
Custom error message
IsRequired
Boolean
False
Mandatory form field
MinNumberFieldsRequired
Integer
1
Validates the minimum number of required fields
IsValid
Boolean
True
Server side validation with the sames rules of client validation
EnableClientValidation
Boolean
true
Enable the client validation for this input
WetRadioButton Extends RadioButton, IWet
Option
Type
Default
Description
LabelText
String
Empty
Text for the label associated to this control
LabelCssClass
String
Empty
Class applied to the label
ValidationErrorMsg
String
Empty
Custom error message
IsRequired
Boolean
False
Mandatory form field
IsInline
Boolean
False
Applied class for inline control
IsValid
Boolean
True
Server side validation with the sames rules of client validation
EnableClientValidation
Boolean
true
Enable the client validation for this input
WetRadioButtonList Extends RadioButtonList, IWet
Option
Type
Default
Description
LabelText
String
Empty
Text for the label associated to this control
LabelCssClass
String
Empty
Class applied to the label
ValidationErrorMsg
String
Empty
Custom error message
IsRequired
Boolean
False
Mandatory form field
IsValid
Boolean
True
Server side validation with the sames rules of client validation
EnableClientValidation
Boolean
true
Enable the client validation for this input
WetDropDownList Extends DropDownList, IWet
Option
Type
Default
Description
LabelText
String
Empty
Text for the label associated to this control
LabelCssClass
String
Empty
Class applied to the label
ValidationErrorMsg
String
Empty
Custom error message
EnableSelectText
boolean
Empty
Add select text to the first item
IsRequired
Boolean
False
Mandatory form field
IsValid
Boolean
True
Server side validation with the sames rules of client validation