Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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 June 22nd, 2006, 06:09 AM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Format command

Can any one tell me what is wrong with this command in vb.net
textbox1.text= format(textbox1.text,"#,###.#0")
where textbox1.text=12345
it is giving output as #,###.#0
It used to work in VB.
 
Old June 22nd, 2006, 12:47 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

hi

use
textbox1.text= format(val(textbox1.text),"#,###.#0")
or
textbox1.text= format(cdec(textbox1.text.trim),"#,###.#0")





 
Old June 22nd, 2006, 01:33 PM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Ashu!
Later i fixed it with
TextBox1.Text=Format(CSng(TextBox1.Text), "##,##.#0")) function





Similar Threads
Thread Thread Starter Forum Replies Last Post
Want command line convertoer for WMV format tarduk2004 ASP.NET 2.0 Basics 0 September 19th, 2007 11:33 PM
Convert Rich Text Format to Ordinary Format in ASP Andraw Classic ASP Basics 1 August 31st, 2007 10:05 AM
Command text was not set for the command object Sheraz Khan Classic ASP Databases 2 May 29th, 2007 12:57 AM
Command text was not set for the command object. deepa12 BOOK: Beginning ASP 3.0 5 November 2nd, 2004 05:37 PM





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