Ajax Filtered TextBox Extender

Ranjeet_8
Posted by Ranjeet_8 under ASP.NET AJAX category on | Points: 40 | Views : 3855
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CodeTesting.aspx.cs" Inherits="CodeTesting" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!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>
<title>Testing Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
eg: Accept only Upper Letters and Valid Chars such as:-&nbsp;&nbsp; +#@.
<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
TargetControlID="TextBox1" FilterType="Custom, UppercaseLetters" ValidChars="+#@.">
</cc1:FilteredTextBoxExtender>
<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
eg: Accept only Lower Letters.
<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server"
TargetControlID="TextBox2" FilterType="LowercaseLetters">
</cc1:FilteredTextBoxExtender>
<br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
eg: Accept only Numbers.
<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server"
TargetControlID="TextBox3" FilterType="Numbers">
</cc1:FilteredTextBoxExtender>
<br />
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
eg: Accept only Valid Chars such as:-&nbsp;&nbsp; !@#$%^&
<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server"
TargetControlID="TextBox4" FilterType="Custom" ValidChars="!@#$%^&">
</cc1:FilteredTextBoxExtender>
</form>
</body>
</html>

Comments or Responses

Login to post response