ekendricks
Posts: 34
|
| Posted: 05/14/2006, 10:14 AM |
|
Using CCS - ASP - Sql Svr 2005
I using "TEXT-TRANSFORM: capitalize" for a textbox, on an entry form, each word is is capitalized. ie: The Big Red Hat.....
Its recorded in the database as ": the big red hat". What I need to accomplish is to capitalize all words, as the "TEXT-TRANSFORM: capitalize" does, but also record such in database, so that view pages, and reports will show same format.
Thanks in advance for suggestions.
Ernest
|
 |
 |
rho
Posts: 85
|
| Posted: 05/14/2006, 11:33 PM |
|
One option is to captalize the value in the textbox using the ucase() function before submitting the form (BeforeUpdate and/or BeforeInsert event)
|
 |
 |
eiden
Posts: 34
|
| Posted: 05/15/2006, 2:25 PM |
|
UCase() sets all the letters to uppercase. "the big red hat" will then be "THE BIG RED HAT", in other words not the solution that ekendricks is looking for.
Search for asp proper case on google ;)
|
 |
 |
Edd
Posts: 547
|
| Posted: 05/16/2006, 7:08 AM |
|
Ernest,
The problem with proper case is that it does always work properly and that you need to let the user have the override capacity.
I think you should fire a javascipt event that on the onChange event propercases the field. A good Javascript function on proper casing can be fount at
http://www.apriori-it.co.uk/PCase.asp#
It even allows for the McDonalds and hyphenated names.
I would allow additional Javascript and a checkbox so the use can turn the proper casing off.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
Ernest
|
| Posted: 05/17/2006, 6:09 AM |
|
Thanks........ works great
Ernest
|
|
|
 |
|