I am using ajax' texteditorender and it has (actually it;s mre like asp texbox has)colums,max length,height tags.
Which is fine, but I take it to be more of the presentation thing.
For some reason it still lets me insert text though passing the box size by letting me drag sideways- I want to disallow this dragging.
I do want it to drag up and down though.
Anyway to change it?
I thought maybe ajax has some function that could help which I am not aware of....
Sukoshi kangaettara nanimo tokubetsu mitsukarenai node,kono mama de oiteokou ka.
MaskedEdit is an ASP.NET AJAX extender that attaches to a TextBox control to restrict the kind of text that can be entered. MaskedEdit applies a "mask" to the input that permits only certain types of characters/text to be entered
It seems to be of validation uses.
It does limit numric values , but I don;t see it limits number of characters permited.
It deals more with masks and validation rather than limits.
Sukoshi kangaettara nanimo tokubetsu mitsukarenai node,kono mama de oiteokou ka.
How do I make it so it checks my input in real time?
And does it have any expression for words in line? like, not total words but words in the same line.
Sukoshi kangaettara nanimo tokubetsu mitsukarenai node,kono mama de oiteokou ka.
Lenjaku
Member
29 Points
226 Posts
how to limit textbox text inserting
May 06, 2012 07:58 AM|LINK
I am using ajax' texteditorender and it has (actually it;s mre like asp texbox has)colums,max length,height tags.
Which is fine, but I take it to be more of the presentation thing.
For some reason it still lets me insert text though passing the box size by letting me drag sideways- I want to disallow this dragging.
I do want it to drag up and down though.
Anyway to change it?
I thought maybe ajax has some function that could help which I am not aware of....
chetan.sarod...
All-Star
66639 Points
11275 Posts
Re: how to limit textbox text inserting
May 07, 2012 03:26 AM|LINK
MaskedEdit is an ASP.NET AJAX extender that attaches to a TextBox control to restrict the kind of text that can be entered. MaskedEdit applies a "mask" to the input that permits only certain types of characters/text to be entered
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/MaskedEdit/MaskedEdit.aspx
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Lenjaku
Member
29 Points
226 Posts
Re: how to limit textbox text inserting
May 13, 2012 11:14 AM|LINK
It seems to be of validation uses.
It does limit numric values , but I don;t see it limits number of characters permited.
It deals more with masks and validation rather than limits.
ruipedromach...
Member
258 Points
84 Posts
Re: how to limit textbox text inserting
May 13, 2012 01:11 PM|LINK
-add a regular expression validator control
-link it to your text box
-on the regular expression use \w{20}
text box will be limited to 20 caracters
Lenjaku
Member
29 Points
226 Posts
Re: how to limit textbox text inserting
May 13, 2012 01:56 PM|LINK
How do I make it so it checks my input in real time?
And does it have any expression for words in line? like, not total words but words in the same line.
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.
Lenjaku
Member
29 Points
226 Posts
Re: how to limit textbox text inserting
May 13, 2012 04:46 PM|LINK
Thank you very much :)