RSS

First Letter of string is Capital in Vb.net and C#

06 Apr

if you want to show your string on web in proper case like every first character is captital then you can use this code

Vb.Net

Dim strchar As String=’sajjad ahmed’

Dim strCaptical As String = StrConv(strchar, VbStrConv.ProperCase)

Result :

Sajjad Ahmed

C-Sharp(C#)

string strchar=”sajjad ahmed”

Strings.StrConv(strchar, VbStrConv.ProperCase)
Advertisements
 
2 Comments

Posted by on April 6, 2011 in ASP Dot Net C#, Gridview

 

2 responses to “First Letter of string is Capital in Vb.net and C#

  1. ranadip dey

    May 5, 2011 at 7:46 am

    Hi,

    StrConv(fname, VbStrConv.ProperCase) worked for me in VS2010.

    Thanks for yur help.

     
  2. humrahimcs

    May 5, 2011 at 9:45 am

    thanks ranadip for comments

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: