Solved

DataTextFormatString in GridView using ASP.net 2.0

Posted on 2007-11-27
2
1,826 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now