By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,086 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,086 IT Pros & Developers. It's quick & easy.

Converting to upper case..

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.