Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   format first name from -john- to -John- ? (http://www.velocityreviews.com/forums/t97519-format-first-name-from-john-to-john.html)

RN 02-27-2005 02:34 AM

format first name from -john- to -John- ?
 
I'm trying to fix user inputed names to proper case. People love to enter
their names in all lower case or all upper, etc. I remember reading
somewhere that there is an easy way in the framework to convert name fields,
first and last, to proper case. I forgot the name of that case syntax, but
basically where you make sure to capitalize the first letter of someone's
first and last name, fix all capital letters ("JOHN" > "john"), etc.

Can someone point me in the right direction please?

Also, is there a way in your solution to not screw up names that should have
>1 capital letters, like "McDonald", so I won't turn it into "Mcdonald"?




dlbjr 02-27-2005 02:48 AM

Re: format first name from -john- to -John- ?
 
http://www.eggheadcafe.com/PrintSear...asp?LINKID=337

--
'dlbjr
'Pleading sagacious indoctrination!



RN 02-27-2005 04:10 AM

Re: format first name from -john- to -John- ?
 
I appreciate the VBScript example, but I'm really looking for the .NET
framework way.

"dlbjr" <oops@iforgot.com> wrote in message
news:OmoNxaHHFHA.3156@TK2MSFTNGP10.phx.gbl...
> http://www.eggheadcafe.com/PrintSear...asp?LINKID=337
>
> --
> 'dlbjr
> 'Pleading sagacious indoctrination!
>
>




Matt Berther 02-27-2005 05:34 AM

Re: format first name from -john- to -John- ?
 
Hello RN,

You may want to look at TextInfo.ToTitleCase [1]...

[1] http://msdn.microsoft.com/library/de...eCaseTopic.asp

--
Matt Berther
http://www.mattberther.com

> I'm trying to fix user inputed names to proper case. People love to
> enter their names in all lower case or all upper, etc. I remember
> reading somewhere that there is an easy way in the framework to
> convert name fields, first and last, to proper case. I forgot the
> name of that case syntax, but basically where you make sure to
> capitalize the first letter of someone's first and last name, fix all
> capital letters ("JOHN" > "john"), etc.
>
> Can someone point me in the right direction please?
>
> Also, is there a way in your solution to not screw up names that
> should have
>
>> 1 capital letters, like "McDonald", so I won't turn it into
>> "Mcdonald"?
>>






All times are GMT. The time now is 01:19 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.