Solved

DataTextFormatString in GridView using ASP.net 2.0

Posted on 2007-11-27
2
1,863 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

623 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