Allow only numeric value Using ASP .Net FiterdTextBoxExtender

Allow user to enter only numeric values using Ajax Asp.net
FilterdTextBoxExtender

Source Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="txtFilter.aspx.vb" Inherits="txtFilter" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>FilteredTextBoxExtender</title>
</head>
<body>
    <form id="form1" runat="server">
   <ajax:ToolkitScriptManager ID="tl" runat="server"></ajax:ToolkitScriptManager>
   <asp:TextBox ID="txtNum" runat="server"></asp:TextBox>
   <ajax:FilteredTextBoxExtender ID="filTxt" runat="server" TargetControlID="txtNum"
    FilterMode="ValidChars" FilterType="Numbers"></ajax:FilteredTextBoxExtender>
    </form>
</body>
</html>


Thanks
Ebook Download
View all
Learn
View all