Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1897
  • 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

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

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