Solved

DataTextFormatString in GridView using ASP.net 2.0

Posted on 2007-11-27
2
1,838 Views
Last Modified: 2013-11-07
Is there a format string I can use to only set the first letter of each word in the string to uppercase and leave the rest lower case? Thanks, Chris.
0
Comment
Question by:jumpstart0321
  • 2
2 Comments
 
LVL 22

Expert Comment

by:RedKelvin
ID: 20362897
0
 
LVL 22

Accepted Solution

by:
RedKelvin earned 500 total points
ID: 20362912
Here is a better solution, using VB.Net

  Private Function ProperCase(ByVal strValue As String) As String

    ProperCase = String.Empty

    Try
      ProperCase = StrConv(strValue, VbStrConv.ProperCase)
    Catch ex As System.Exception
      'Error hadler goes here
    End Try

    Return ProperCase
  End Function
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question