473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Converting to upper case..

In my web form, I am converting all lower case letters to upper case when
the user types the characters in the edit boxes. I am achieving that by
injecting client side script (onkeyup event) for each text box. However if
the user types the characters so fast it may not work.. Also there are some
other loopholes in my code. Is there any approach in ASP.Net to make sure
whenever the user types lower case, the data will be converted to upper
case.

My application is written using ASP.Net (VB.Net, Java Script and .Net Frame
Work 1.1 and TE 5.5+)

Thanks for your answers.

Nelson
Nov 18 '05 #1
5 10259
You can convert the data in the code behind to uppercase using ToUpper()
method

"Nelson" <Ne*************@hotmail.com> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
In my web form, I am converting all lower case letters to upper case when
the user types the characters in the edit boxes. I am achieving that by
injecting client side script (onkeyup event) for each text box. However if
the user types the characters so fast it may not work.. Also there are some other loopholes in my code. Is there any approach in ASP.Net to make sure
whenever the user types lower case, the data will be converted to upper
case.

My application is written using ASP.Net (VB.Net, Java Script and .Net Frame Work 1.1 and TE 5.5+)

Thanks for your answers.

Nelson

Nov 18 '05 #2
OK.
Any Other solution ?
Thanks,
Nelson
"Kumar Reddi" <Ku********@REMOVETHIS.gmail.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
You can convert the data in the code behind to uppercase using ToUpper()
method

"Nelson" <Ne*************@hotmail.com> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
In my web form, I am converting all lower case letters to upper case when the user types the characters in the edit boxes. I am achieving that by
injecting client side script (onkeyup event) for each text box. However if the user types the characters so fast it may not work.. Also there are

some
other loopholes in my code. Is there any approach in ASP.Net to make sure whenever the user types lower case, the data will be converted to upper
case.

My application is written using ASP.Net (VB.Net, Java Script and .Net

Frame
Work 1.1 and TE 5.5+)

Thanks for your answers.

Nelson


Nov 18 '05 #3
I don't think there is any, because if users have javascript turned off then
you are still back to the same problem. So, its best to always validate on
the sever (which you can control) to conform to your business rules.

"Nelson" wrote:
OK.
Any Other solution ?
Thanks,
Nelson
"Kumar Reddi" <Ku********@REMOVETHIS.gmail.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
You can convert the data in the code behind to uppercase using ToUpper()
method

"Nelson" <Ne*************@hotmail.com> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
In my web form, I am converting all lower case letters to upper case when the user types the characters in the edit boxes. I am achieving that by
injecting client side script (onkeyup event) for each text box. However if the user types the characters so fast it may not work.. Also there are

some
other loopholes in my code. Is there any approach in ASP.Net to make sure whenever the user types lower case, the data will be converted to upper
case.

My application is written using ASP.Net (VB.Net, Java Script and .Net

Frame
Work 1.1 and TE 5.5+)

Thanks for your answers.

Nelson



Nov 18 '05 #4
Or,
you can use asp.net validation regularexpression control and Force them to
type in all caps. This will not allow the form to be submitted if they
don't. This will validate both on server and on client (if enabled). Probably
the best solution

"Nelson" wrote:
OK.
Any Other solution ?
Thanks,
Nelson
"Kumar Reddi" <Ku********@REMOVETHIS.gmail.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
You can convert the data in the code behind to uppercase using ToUpper()
method

"Nelson" <Ne*************@hotmail.com> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
In my web form, I am converting all lower case letters to upper case when the user types the characters in the edit boxes. I am achieving that by
injecting client side script (onkeyup event) for each text box. However if the user types the characters so fast it may not work.. Also there are

some
other loopholes in my code. Is there any approach in ASP.Net to make sure whenever the user types lower case, the data will be converted to upper
case.

My application is written using ASP.Net (VB.Net, Java Script and .Net

Frame
Work 1.1 and TE 5.5+)

Thanks for your answers.

Nelson



Nov 18 '05 #5
you could convert on the onsubmit event.
function myOnSubmit()
{
var elist = document.getElementsByTagName("INPUT");
for (var i in elist) elist[i].value = elist[i].value.toUpperCase();
return true;
}

<form onsubmit="myOnSubmit()" runat="server">
"Nelson" <Ne*************@hotmail.com> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
| In my web form, I am converting all lower case letters to upper case when
| the user types the characters in the edit boxes. I am achieving that by
| injecting client side script (onkeyup event) for each text box. However if
| the user types the characters so fast it may not work.. Also there are
some
| other loopholes in my code. Is there any approach in ASP.Net to make sure
| whenever the user types lower case, the data will be converted to upper
| case.
|
| My application is written using ASP.Net (VB.Net, Java Script and .Net
Frame
| Work 1.1 and TE 5.5+)
|
| Thanks for your answers.
|
| Nelson
|
|
Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ToddT | last post by:
i'm trying to convert names to their proper case (e.g. "todd" -> "Todd") using the following rountine: Private Function ConvertToProperCase(ByVal stringValue As String) As String Dim ci ...
2
by: kevin | last post by:
Hello, we've an Oracle transition in the pipeline and want to convert all our database objects to upper case. Any one got a script or technique (other than manual) to do it? Many thanks, Kevin.
10
by: jose.jeria | last post by:
I use the following to convert uppercase to lowercase: translate($queryString, 'ABCDE...', 'abcde...') But how can i convert the case for umlauts? φεδ etc
4
by: programmerforhire | last post by:
Hello all, Is there a way to setup an ms-access table so that when I enter text in the 'datasheet' mode, it will automatically be converted tp upper case. Or must I use a Form for this? rex
3
by: Brian Conway | last post by:
How do I convert a field that is filled in to uppercase within the C3 code? I see the ToUpper in there, but how do I get the text box to convert this to upper when you change focus or move to...
8
by: Brian Conway | last post by:
How do I convert a field that is filled in to uppercase within the C3 code? I see the ToUpper in there, but how do I get the text box to convert this to upper when you change focus or move to...
6
by: Manish | last post by:
In my application there is need for only upper case chars.. Currently I am making entry to upper case when user leaves focus of the text control. I want to do some modification here...When user...
2
by: Curious Trigger | last post by:
Hello, if have an asp.net web page with a detailsview. This detailsview uses a sqldatasource connecting to a sql server 2005 database with a select statement simliar to this one: SELECT...
1
by: nbowman | last post by:
How do you convert lower case to upper case in the entire Access database, while maintaining data that is in upper case?
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.