Monday, April 20, 2009

Setting the Maxlength in multiline textbox using javascript

This article is very useful when writing comments on your website.. There it will specify you to enter 100 character,200 characters something like that.. Lets Go through this article step by step..



step1:

Go to visual studio>add new website(C# or vb)..




step2:

Next is to add the textbox and label on your page.. set the TextMode of textbox to multiline,set the MaxLength to 100 and write the event as onKeyUp="javascript:charcount(this.id)"

After adding the page looks like this..



Step3:

Write the script tag below the head as




I hope you people like this article..

No comments:

Post a Comment