• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

upper case in javascript

In ASP.NET 2.0 I have a textbox in a formview.
I want that when the user type something it will be changed to upper letters as he leave the field.
1. how do I do it in javascript ?
2. I wrote it in the event textchanged in the code behind but only when another button that make a postback
is pushed it happens.
ThankYou
Anat
0
ANAT2403
Asked:
ANAT2403
1 Solution
 
adatheladCommented:
Hi ANAT2403,

You can add a clientside onblur event to the textbox.
e.g. from codebehind page load, something like this:
MyTextBox.attributes.add("onblur","this.value = this.value.toUpperCase();")

This "onblur" event will occur clientside.



0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now