Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > format first name from -john- to -John- ?

Reply
Thread Tools

format first name from -john- to -John- ?

 
 
RN
Guest
Posts: n/a
 
      02-27-2005
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"?



 
Reply With Quote
 
 
 
 
dlbjr
Guest
Posts: n/a
 
      02-27-2005
http://www.eggheadcafe.com/PrintSear...asp?LINKID=337

--
'dlbjr
'Pleading sagacious indoctrination!


 
Reply With Quote
 
 
 
 
RN
Guest
Posts: n/a
 
      02-27-2005
I appreciate the VBScript example, but I'm really looking for the .NET
framework way.

"dlbjr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> http://www.eggheadcafe.com/PrintSear...asp?LINKID=337
>
> --
> 'dlbjr
> 'Pleading sagacious indoctrination!
>
>



 
Reply With Quote
 
Matt Berther
Guest
Posts: n/a
 
      02-27-2005
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"?
>>




 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a variable name to a hash to name is part of the variable name Bobby Chamness Perl 2 04-22-2007 09:54 PM
Why XmlNode.Name get node name and its first attribute together? =?Utf-8?B?ZGF2aWQ=?= ASP .Net 0 03-12-2007 05:06 PM
print("my name is {name}, and {age}-year old {gender}", name, age, gender); =?iso-8859-1?B?bW9vcJk=?= Java 7 01-02-2006 04:39 PM
Get column name, first record name Leszek ASP .Net 2 01-19-2005 09:43 AM
Re: Urgent! how to get object name, method name and attribute name based on the strings? ding feng C++ 2 06-25-2003 01:18 PM



Advertisments