Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Web Textbox CharacterCasing??

 
Thread Tools Search this Thread
Old 11-16-2005, 01:56 AM   #1
Default Web Textbox CharacterCasing??


The web textbox doesn't have a CharacterCasing property as does the forms
textbox. Any way cause characters typed in to be Upper case?
Thanks,
T




Tina
  Reply With Quote
Old 11-16-2005, 02:35 AM   #2
Greg Burns
 
Posts: n/a
Default Re: Web Textbox CharacterCasing??
"Tina" <> wrote in message
news:...
> The web textbox doesn't have a CharacterCasing property as does the forms
> textbox. Any way cause characters typed in to be Upper case?


I use CSS to do this.

<head runat="server">
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" runat="server"
CssClass="UpperCase"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"
CssClass="ProperCase"></asp:TextBox>
</form>
</body>

Contents of StyleSheet.css

..UpperCase
{
text-transform:uppercase;
}

..ProperCase
{
text-transform:capitalize;
}

Greg




Greg Burns
  Reply With Quote
Old 11-16-2005, 02:38 AM   #3
Showjumper
 
Posts: n/a
Default Re: Web Textbox CharacterCasing??
You need javascript to format the text as it is typed. Or convert to upper
case on the server.
"Tina" <> wrote in message
news:...
> The web textbox doesn't have a CharacterCasing property as does the forms
> textbox. Any way cause characters typed in to be Upper case?
> Thanks,
> T
>





Showjumper
  Reply With Quote
Old 11-17-2005, 06:05 PM   #4
Tina
 
Posts: n/a
Default Re: Web Textbox CharacterCasing??
Greg,
That worked great! Thanks
T

"Greg Burns" <> wrote in message
news:%...
> "Tina" <> wrote in message
> news:...
>> The web textbox doesn't have a CharacterCasing property as does the forms
>> textbox. Any way cause characters typed in to be Upper case?

>
> I use CSS to do this.
>
> <head runat="server">
> <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
> </head>
> <body>
> <form id="form1" runat="server">
> <asp:TextBox ID="TextBox1" runat="server"
> CssClass="UpperCase"></asp:TextBox>
> <asp:TextBox ID="TextBox2" runat="server"
> CssClass="ProperCase"></asp:TextBox>
> </form>
> </body>
>
> Contents of StyleSheet.css
>
> .UpperCase
> {
> text-transform:uppercase;
> }
>
> .ProperCase
> {
> text-transform:capitalize;
> }
>
> Greg
>





Tina
  Reply With Quote
Old 11-18-2005, 05:19 PM   #5
Tina
 
Posts: n/a
Default Re: Web Textbox CharacterCasing??
an interesting side effect....

if I have a regular expression tied to that field and the user enters lower
case, the RE gets the lower case but the textbox gets uppercase.

T


"Greg Burns" <> wrote in message
news:%...
> "Tina" <> wrote in message
> news:...
>> The web textbox doesn't have a CharacterCasing property as does the forms
>> textbox. Any way cause characters typed in to be Upper case?

>
> I use CSS to do this.
>
> <head runat="server">
> <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
> </head>
> <body>
> <form id="form1" runat="server">
> <asp:TextBox ID="TextBox1" runat="server"
> CssClass="UpperCase"></asp:TextBox>
> <asp:TextBox ID="TextBox2" runat="server"
> CssClass="ProperCase"></asp:TextBox>
> </form>
> </body>
>
> Contents of StyleSheet.css
>
> .UpperCase
> {
> text-transform:uppercase;
> }
>
> .ProperCase
> {
> text-transform:capitalize;
> }
>
> Greg
>





Tina
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get datagrid textbox value kanchangorak Software 0 03-11-2009 11:11 AM
VB .NET: How to extract the value of a textbox in a GridView TemplateField? k3nz0 General Help Related Topics 1 03-01-2009 06:26 AM
gridview textbox value refresh apdbrl1 Software 1 06-12-2008 06:29 PM
ASP.NET VB Using ItemDataBound to create textbox in datagrid rows. smi59550 General Help Related Topics 0 01-18-2008 07:42 PM
How do find out if a button was clicked before the textchanged event of textbox fires Jack General Help Related Topics 0 10-27-2006 10:19 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46