troubleshooting Question

Counting remaining TextBox Characters

Avatar of gjpitt
gjpitt asked on
5 Comments1 Solution1985 ViewsLast Modified:
I have tried the solutions listed on this site but none work.
I have a multiline textbox that passes a message to a 255 character text field. I need to have a label or textbox showing the number of remaining character avaialble to the user.

In classic asp I used Javascript functions to write the value to the "Count" textbox but this doesn't work in .net.

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        TextBox2.Text = TextBox1.Text.Length
    End Sub

Nothing happens with this code.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros