Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

easy question building character count in asp.net

Posted on 2009-12-20
5
Medium Priority
?
309 Views
Last Modified: 2012-05-08
I need to build the textboxarea with the number of characters remaINING.
please see attached file.

characters.png
0
Comment
Question by:mathieu_cupryk
5 Comments
 
LVL 29

Assisted Solution

by:Kumaraswamy R
Kumaraswamy R earned 664 total points
ID: 26093064
0
 
LVL 7

Accepted Solution

by:
aplusexpert earned 668 total points
ID: 26093719
Hi

Just one step ahead, write javascript to count typed character and subtract from the max length in keypress event.

Thanks
0
 

Author Comment

by:mathieu_cupryk
ID: 26093743
this I need in there.
0
 
LVL 4

Assisted Solution

by:apexpert
apexpert earned 668 total points
ID: 26095013
<SCRIPT LANGUAGE="JavaScript">

function textCounter(field,cntfield,maxlimit)
{
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
cntfield.value = maxlimit - field.value.length;
}
</script>

onKeyDown="textCounter(document.myForm.message1,document.myForm.remLen1,125)"

onKeyUp="textCounter(document.myForm.message1,document.myForm.remLen1,125)"
0
 

Author Closing Comment

by:mathieu_cupryk
ID: 31668337
k
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question