Validation ASP.Net Tutorial

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"  Inherits="DisableClientValidation" %>



    Untitled Page


    
    
    Quantity:
    
                                    runat="server" 
                             ControlToValidate="txtQuantity" 
                             Operator="DataTypeCheck"
                             Type="Integer"
                             EnableClientScript="false"
                             Text="Enter a valid whole number" />   
    
    
    
          
    


File: Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class DisableClientValidation : System.Web.UI.Page
{
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
       if (IsValid)
       {
          int quantity = Convert.ToInt32(txtQuantity.Text);
          int unitCost = 5;
          int price = quantity * unitCost;
          labContent.Text = "Price for order is $" + price;
       }   
    }
}