|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
How can I restric a multirow textbox's text length, Max Length doesn't seem
to really do anything. I want the user to not be able to type, say more that 300 chars. TIA! You'll need to use javascript to accomplish this.
Show quoteHide quote "TCORDON" <tcord***@hotmail.com> wrote in message news:u2ms3r0TFHA.952@TK2MSFTNGP10.phx.gbl... > How can I restric a multirow textbox's text length, Max Length doesn't > seem to really do anything. I want the user to not be able to type, say > more that 300 chars. > > TIA! > Hi TCORDON
Here are the steps to restrict the text lenght multirow textbox's while the user types. Step 1 : Add the Attribute Property to the multirow textbox Control Id If your multirow textbox's Id is "txtAddress" Me.txtAddress.Attributes.add("onclick","return CheckLenght();") in the Code behind (Means aspx.vb file) Step 2 : <Script Language=Javascript> function CheckLenght() { var strLenght = document.getElementById("txtAddress").value.length; return (strLenght <= 300) } How can I restric a multirow textbox's text length, Max Length doesn't seem to really do anything. I want the user to not be able to type, say more that 300 chars. Hi TCORDON
Here are the steps to restrict the text length multirow textbox while the user types. Step 1 : Add the Attribute Property to the multirow textbox Control Id If your multirow textbox's Id is "txtAddress" Me.txtAddress.Attributes.add("onclick","return CheckLength();") in the Code behind (Means aspx.vb file) Step 2 : <Script Language=Javascript> function CheckLength() { var strLenght = document.getElementById("txtAddress").value.length; return (strLenght <= 300) } </Script> Hope this helps ! All the best.
HELP! TabStrip with Multipage is not working!
Listbox and multiple selection How to use Microsoft Rich TextBox control 6? 2d graphics controls Text_Changed ? Confirm Delete in DataGrid How to render script code at the end of Page? Converting XMLDocument To String Rollover from Image Ready Any security issues with IE WebControls |
|||||||||||||||||||||||