HTML Controls ASP.Net Tutorial

<%@ Page  Language="C#" AutoEventWireup="true"%>



    Form filling (ASP.NET)


function CheckMembership(source, arguments)
{
  arguments.IsValid = false;
  var buf = arguments.Value;
  if (buf == "Normal" || buf== "Silver" ||
            buf == "Gold" || buf == "Platinum")
    arguments.IsValid = true;
}


    
        
          
              
                  
                
              
                  
                
              
                  
                
              
                  
                
              
                  
                
          
Name*
                                            ControlToValidate="fname" 
                      Text="!!!"
                        ErrorMessage="Name is mandatory" />
Last Name*
                                            ControlToValidate="lname" 
                      Text="!!!"
                        ErrorMessage="Last name is mandatory" />
Age
                                            ControlToValidate="age" 
                      Operator="GreaterThanEqual" 
                      ValueToCompare="18"
                        Type="integer"
                        ErrorMessage="Age must be at least 18." />
Hire Date
                                            ControlToValidate="hired" 
                      Display="Static"  
                      Operator="DataTypeCheck" 
                        Type="date"
                        ErrorMessage="Must enter a date." />
                                            ControlToValidate="hired" 
                      Display="Dynamic"
                        MinimumValue="1999-1-1"
                      MaximumValue="9999-12-31"
                        Type="Date"
                        ErrorMessage="Date after 1-1-99." />
Membership Level
                                             ControlToValidate="membership" 
                       ClientValidationFunction="CheckMembership"
                         ErrorMessage="Must be Gold or Platinum." />

          
          
            

                        ShowMessageBox="true" 
            ShowSummary="true" 
            HeaderText="The following errors occurred:"
            DisplayMode="BulletList" />