Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 24th, 2007, 01:46 AM
Authorized User
 
Join Date: Apr 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to change the case of data in data list while

helo every1,
pls solve my problem
i m showing data in data list using asp.net 2003
My problem is

FirstName // column name in datalist
RAVI
ANIL
AMIT

I want this data is show like this

FirstName // column name in datalist
Ravi
Anil
Amit
 
Old April 24th, 2007, 03:47 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can use some tricky logic, one of them can be as below, try it:

private string SetNormalCase(string Data)
{
            return Data.Substring(0,1).ToUpper() + Data.Substring(1).ToLower();
}

Test it with the below line:
Response.Write(SetNormalCase("MICHAEL"));




Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
 
Old April 24th, 2007, 03:53 AM
Authorized User
 
Join Date: Apr 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks sir
this is wonderful working


Quote:
quote:Originally posted by mike_remember
 You can use some tricky logic, one of them can be as below, try it:

private string SetNormalCase(string Data)
{
            return Data.Substring(0,1).ToUpper() + Data.Substring(1).ToLower();
}

Test it with the below line:
Response.Write(SetNormalCase("MICHAEL"));




Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
 
Old April 24th, 2007, 03:58 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

It was just an idea I gave, glad it worked for you.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data List Selection Norberto_Caraballo Beginning VB 6 1 June 24th, 2006 09:41 AM
more nodes to b retrived if change in data ali_md SQL Server 2000 0 February 2nd, 2006 08:52 AM
Transform data does not change Vince.Stanzione XSLT 0 September 22nd, 2005 12:01 PM
change data type to date kherboon Access 2 July 29th, 2003 10:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.