Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Onkeyup on textbox
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Onkeyup on textbox
Environment versions
Environment:
ASP.NET
Application:
Web
Miscellaneous
Thread ID:
01520397
Message ID:
01520397
Views:
180
Trying to find simplest, cleanest way to force data entered into textbox on form to upper case, not only display

For display, this works easily in my modified mm.css file applied to all pages :
.UpperCase
{
text-transform:uppercase;
}
but the data behind the scenes that will be saved back to database or used in search. So I tried the following with javascript. It seems to work, but when I compile, I get error message:
Message	1	Validation (ASP.Net): Attribute 'onkeyup' is not a valid attribute of element 'mmTextBox'.	N:\DEV_TEST\PRESCHAL\ASP.NET\PresChalWebApp\PresChalWebApp\App_Pages\CustLookUp.aspx	64	33	PresChalWebApp

		<mm:mmTextBox ID="txtState" runat="server" Width="30px" CssClass="TextBox-ReadWrite UpperCase"
            AutoPostBack="true" onkeyup="javascript:this.value=this.value.toUpperCase();" >
		</mm:mmTextBox>
FWIW, there appears to be a new property ‘charactercasing’ in .NET 4 on textbox controls. However, if I try to use it on an mm:mmTextBox, it is not recognized. I did not try it to see if it works anyway, perhaps I should, since the above seems to work. Anyway quick and dirty way to make these messages disappear? I am going to be putting the upper casing on a LOT of textboxes.

http://msdn.microsoft.com/en-us/library/system.windows.controls.textbox.charactercasing.aspx


I am using the latest MM.NET 4.0 Kevin released June 22, 2011. VS 2010.
Ronald D. Edge
Retired from Indiana University Mar 1, 2011

"You've got to be very careful if you don't know where you are going,
because you might not get there."
“When you come to the fork in the road, take it.”
--Yogi Berra
Next
Reply
Map
View

Click here to load this message in the networking platform