Sunday, 8 September 2013

How to Use ASP.NET AJAX FILTERED TEXTBOX EXTENDER CONTROL

How to Use ASP.NET AJAX FILTERED TEXTBOX EXTENDER CONTROL


1) Create Website
2) Add aspx page
3) Add toolkitScriptManager
4) If you don't have ajax control toolkit  download from codeplex
5) Add Collapsible Panel Extender


asp:FilteredTextBoxExtender   Properties

1) TargetControlID --> TextBox Control where filter should be applied
2) FilterMode ->ValidChars,InvalidChars
         if set to ValidChars then ValidChars property should be set
         same for InvalidChars
3)FilterType -> LowercaseLetters,UppercaseLetter,Custom,Numbers or combination of these
4) ValidChars -> set comma seperated char list




This example example explains How to use Filtered TextBox.

  i.e It allows Upper,Lower Case letters +  apostrophe+space chars



       <b>Company Name:</b>
        <asp:TextBox ID="txtZip" runat="server"></asp:TextBox>

        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
         FilterType="LowercaseLetters,UppercaseLetters,Custom"
         FilterMode="ValidChars" TargetControlID="txtZip" ValidChars="', ,">
        </asp:FilteredTextBoxExtender>


Run the Web Page

No comments:

Post a Comment