Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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 February 28th, 2009, 02:47 AM
Registered User
 
Join Date: Sep 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Decimal TextBox in ASP.NET

Hi,
i want to create Decmal Text box control with 3 decimal point.this textbox control should accept number and decimal point.If anybody know or have some idea pls tell me.


Regards
Aziz

Last edited by azizur123; February 28th, 2009 at 05:20 AM..
 
Old March 4th, 2009, 01:41 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You could simply use a RegEx.

This pattern should work:

(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,3})?$

taken from: http://regexlib.com/DisplayPatterns....2&categoryId=3

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I set TextBox value from asp.net Listbox, vishnu108mishra ASP.NET 2.0 Professional 1 March 10th, 2008 06:11 AM
Text Formating in ASP.Net Textbox aliirfan84 ASP.NET 2.0 Professional 4 May 25th, 2007 03:04 AM
ASP.NET TextBox Control Dilema johne ASP.NET 1.0 and 1.1 Basics 4 April 19th, 2005 08:13 AM
unable to display stored data in textbox(asp.net) Abhinav_jain_mca ADO.NET 6 August 4th, 2004 07:45 AM
unable to print stored data in textbox(asp.net) Abhinav_jain_mca ADO.NET 1 July 30th, 2004 09:34 PM





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