Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Capital letters

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
0
0
US
Can someone show me how to force capital letters in a textbox. even if the user does not have caps on.

Thanks
 
Craig0201,

I have tryed messing around with String toupper but cannot figure it out. since there is no key press event. I am a VB6 person and new to .Net

can you give me an example of how to use the string toupper?

Thanks alot
 
If you want it to be dynamic, correcting as the user types it, I may be incorrect, but I believe JavaScript will be your only solution.

Chris "Illegitimis non carborundum"
(don't let the b@st@rds get you down)
 
This is easy to do with javascript if that is the solution you want,, see below..



<form name=&quot;Form1&quot;>
<input name=&quot;Input1&quot; value=&quot;type text here &quot;
onchange=&quot;this.value=this.value.toUpperCase();&quot;><br>

<input name=&quot;Input2&quot; value=&quot;and it will be &quot;
onchange=&quot;this.value=this.value.toUpperCase();&quot;><br>

<input name=&quot;Input3&quot; value=&quot;made upper case&quot;
onchange=&quot;this.value=this.value.toUpperCase();&quot;><br>
</form>



(The more ASP.NET I do, the more Javascript I find myself using)
 
Great quote StuckInTheMiddle.

We have to remind ourselves, asp.net is NOT a client-side programming language. It is Server-Sided one, and as such, we are best when we learn the logistics behind the two very different methods. &quot;Illegitimis non carborundum&quot;
(don't let the b@st@rds get you down)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top