• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1910
  • Last Modified:

DataTextFormatString in GridView using ASP.net 2.0

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
jumpstart0321
Asked:
jumpstart0321
  • 2
1 Solution
 
RedKelvinCommented:
0
 
RedKelvinCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now