Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services 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 February 28th, 2004, 02:04 PM
Registered User
Join Date: Feb 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Textbox format

I'm just beginning to learn about asp.net and need some help. I'm creating a web page with server side text boxes. I'd like to have some formatting associated with each one. For example, I'm building a financial calculator. One of the fields or textboxes will have a dollar amount. If the user enters "300000", as soon as they tab out I'd like the system to instantly change the format to "$300,000.00". I'm not seeing any input format that can be forced in the properties and I tried a few things with the Format method but have not been successful. Any ideas would be appreciated. Thanks.

Old February 28th, 2004, 03:32 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

You are going to have to write javascript to handle that. It's not a function of .NET. On the text box you are going to have to call some javascript from the "onChange" client side handler. This script will have to parse and format the string in the textbox to change it to appear as you want.

Work smarter, not harder.

Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox Format prasanna.nadgir C# 4 September 11th, 2007 09:50 AM
print with the same textbox format abdrabaa C# 1 July 9th, 2007 04:53 AM
numeric format for a textbox Rudner Beginning VB 6 1 November 9th, 2004 02:29 PM
Masked TextBox & formatting TextBox melvik C# 1 September 22nd, 2003 11:01 AM

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