<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NumericTextBox.aspx.cs"
    Inherits="WebApplication1.NumericTextBox" %>

<!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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="SM1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/NumberOnlyTextBox.js" />
        </Scripts>
    </asp:ScriptManager>
    <asp:TextBox ID="txtBox1" runat="server" Width="50px"></asp:TextBox>
    </form>
    <script type="text/javascript">
    Sys.Application.add_init(
      function() { 
        $create(NumberOnlyTextBox, null, null, null, $get("txtBox1"));
      }
    );
    </script>
</body>
</html>
