Wrox Programmer Forums
|
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 December 21st, 2006, 02:47 PM
Authorized User
 
Join Date: Sep 2006
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default Formatting Query

The current sub procedure (written in asp.net 1.1 / vb2003) outputs the value as :

Total : 12

I want to set this up as :

Total : £12:00.

Code:
The source access database has the values set to currency with two decimal 

places. How do I achieve this ? Here's the source code :
 Sub ComputeSum(sender As Object, e As DataGridItemEventArgs)
            'Ensure dealing with an Item or AlternatingItem
            If e.Item.ItemType = ListItemType.Item OR _
                e.Item.ItemType = ListItemType.AlternatingItem then
            'Define the ViewCount
                Dim viewCount as Integer = _
                Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "curSalePrice"))
                viewCountSum += viewCount
            ElseIf e.Item.ItemType = ListItemType.Footer then
                e.Item.Cells(7).Text = "Total: £" & String.Format("{0:#,###}", 

GetTotal())
            End If
        End Sub









Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting Query rsm42 ASP.NET 1.0 and 1.1 Basics 1 May 19th, 2007 04:58 AM
Formatting sql query rows as columns with stack sastian PHP Databases 0 March 25th, 2005 04:51 AM
Query/formatting problem in report mega Access VBA 8 September 16th, 2004 04:29 AM
MYSQL Query text Formatting yourcompadre Beginning PHP 1 May 12th, 2004 06:55 AM
Formatting Ben Access 3 February 28th, 2004 05:52 AM





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