- This control is used to filter and control the content to be input by textbox. Filter according to your needs. You can customize them, or use the defined method.
- See the results.
The effect is not very prominent. Note that only uppercase letters and numbers can be entered. Because of the restrictions, what advanced applications are there? Still to be studied.
Filtertype: Optional values include custom, numbers, uppercaseletters, and lowercaseletters.
Targetcontrolid: ID of the control to be controlled
Validchars: The content defined here cannot be entered.
Filtermode: ivalidchars is used to control which types of letters cannot be entered.
In this example, only uppercase letters, numbers, and 12 numbers are allowed. I think this method can prevent injection attacks.
Code
< Div >
< ASP: scriptmanager ID = "SM" Runat = "Server" >
</ ASP: scriptmanager >
< ASP: updatepanel ID = "Updatepanel1" Runat = "Server" >
< Contenttemplate >
< ASP: textbox ID = "Textbox" Runat = "Server" > </ ASP: textbox >
< Ajax: filteredtextboxextender ID = "Tb_filter" Runat = "Server" Filtertype = "Numbers, uppercaseletters"
Targetcontrolid = "Textbox" Validchars = "12" filtermode = "invalidchars" >
</ Ajax: filteredtextboxextender >
</ Contenttemplate >
</ ASP: updatepanel >
</ Div >
I would like to dedicate this article to the old friend who just got a new job to go to the School Intranet. Congratulations.