turn uppercase on in controls

  • Thread starter Thread starter Beffmans
  • Start date Start date
One method is to use CSS

input { text-transform: capitalize }
or
<input STYLE="text-transform: capitalize" type="text" />

this would make every chat typed in the text box appear in Upper case

But this handles only the display, the actual text is still how the user
typed it. So, before saving/processing the data at server side you may change
it to uppercase

string strUpper = TextBox1.Text.ToUpper();
************************************
If you need every char typed in Textbox instantly changed to Uppercase

you may use the OnKeyPress(or onkeydown) event in Javascript and change the
current char(event.keyCode) to uppercase
************************************
If you need the entire string to be changed to Uppercase , once the user
finished typing

you may use the onblur event in Javascript and change the content of textbox
to uppercase

hope this helps .. pls let me know if you have any questions

Regards
Sreejith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top