views:

27

answers:

1

Hi Guys

I need to DISPLAY the text in an asp textbox as upper case, regardless of whether the users caps lock is on or not – is there some property or method I can use? I am converting the text using the .ToUpper method on submitting to the database anyway, but I have been asked to also DISPLAY it in upper case before that when first being typed.

Any help would be much appreciated.

Abhi.

+5  A: 

use CSS for that

  #idOfyourTextbox{
      text-transform: uppercase;
  }

uppercase that is ;)

Caspar Kleijne
if he uses server control it is better to create class in css :)
Danil
no it is not: css inside the server control creates inline css, that is bad practice ;) CSS shoul always be in a stylesheet, referenced by class, Id or elementname in the HTML.
Caspar Kleijne
Thanks mate, it worked...
Abhi