Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
258 Points
84 Posts
May 13, 2012 04:36 PM|LINK
im sorry , i didnt get you the first time.
use client event "onkeypress"
<asp:TextBox ID="TextBox1" runat="server" onkeypress="rui()"> </asp:TextBox>
and create a javascript function
<script language="javascript" type="text/javascript"> function rui() { alert('max 20'); } </script>
everytime the key is pressed it will check the function.
ruipedromach...
Member
258 Points
84 Posts
Re: how to limit textbox text inserting
May 13, 2012 04:36 PM|LINK
im sorry , i didnt get you the first time.
use client event "onkeypress"
<asp:TextBox ID="TextBox1" runat="server" onkeypress="rui()"> </asp:TextBox>and create a javascript function
<script language="javascript" type="text/javascript"> function rui() { alert('max 20'); } </script>everytime the key is pressed it will check the function.