Using the RangeValidator control to test an integer value : RangeValidator « Validation « ASP.NET Tutorial

Home
ASP.NET Tutorial
1.ASP.Net Instroduction
2.Language Basics
3.ASP.net Controls
4.HTML Controls
5.Page Lifecycle
6.Response
7.Collections
8.Validation
9.Development
10.File Directory
11.Sessions
12.Cookie
13.Cache
14.Custom Controls
15.Profile
16.Configuration
17.LINQ
18.ADO.net Database
19.Data Binding
20.Ajax
21.Authentication Authorization
22.I18N
23.Mobile
24.WebPart
25.XML
ASP.NET Tutorial » Validation » RangeValidator 




<%@ Page Language="VB" %>
<script runat="server">

    Protected Sub Button1_Click(sender As Object, e As EventArgs)
       Label1.Text = "Passwords match"
    End Sub

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>CompareFieldValidator</title>
</head>
<body>
    <form id="Form1" runat="server">
        Age:
        <asp:TextBox ID="TextBox1" Runat="server"></asp:TextBox>
          &nbsp;
        <asp:RangeValidator ID="RangeValidator1" 
                            Runat="server"
                            ControlToValidate="TextBox1" 
                            Type="Integer"
                            ErrorMessage="You must be between 30 and 40"
                            MaximumValue="40" 
                            MinimumValue="30"></asp:RangeValidator>
        
            <asp:Button ID="Button1" OnClick="Button1_Click" 
             Runat="server" Text="Login"></asp:Button>
        
        
            <asp:Label ID="Label1" Runat="server"></asp:Label>
        
    </form>
</body>
</html>














8.8.RangeValidator
8.8.1.RangeValidator checks whether the value falls between a minimum and maximum value
8.8.2.Set Minimum/Maximum Value, ErrorMessage, ControlToValidate, EnableClientScript for asp:RangeValidator (C#)
8.8.3.Manual Validation
8.8.4.Use asp:RangeValidator to check the value range in an asp:textbox
8.8.5.asp:RangeValidator is converted to JavaScript code after loading in client side
8.8.6.Using the RangeValidator control to test an integer value
8.8.7.Using the RangeValidator control to test a string date value (C#)
8.8.8.Using the RangeValidator control to test a string date value (VB.net)
8.8.9.RangeValidator for number and date
8.8.10.Birthday range
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.