?
Solved

UpperCase textbox

Posted on 2009-02-08
6
Medium Priority
?
1,787 Views
Last Modified: 2013-12-14
I need all the text fields (textbox) from my form to be filled with text in uppercase, but not found any property on textbox component to do that, you can help me?

I use textbox on ASP.NET webpage.
0
Comment
Question by:fsouzabrasil
6 Comments
 
LVL 25

Expert Comment

by:reb73
ID: 23584313
Use the UCASE() function!
0
 
LVL 4

Author Comment

by:fsouzabrasil
ID: 23584401
yes, on code i use textbox.toUpper(), but when user write on textbox i need display uppercase chars.

Thanks...
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 23584405
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 25

Expert Comment

by:reb73
ID: 23584422
An alternative is to use the Change event for the control to convert the contents by using <control>.toUpper()
0
 
LVL 16

Accepted Solution

by:
sunithnair earned 375 total points
ID: 23584433
You can add attributes to the textbox to do this using javascript
txtBox.Attributes.Add("onkeyup", "this.value=this.value.toUpperCase();");
txtBox.Attributes.Add("onblur", "this.value=this.value.toUpperCase();");
 
or you can do it in code behind
 
string text = txtBox.Text.toUpper();

Open in new window

0
 
LVL 27

Expert Comment

by:nmarun
ID: 23584449
CSS's the way to go:



<asp:TextBox ID="testBox" runat="server" CssClass="uCase" />
 
.uCase
{
    text-transform: uppercase;
}

Open in new window

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question