Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox in ASP.NET (Again .. )
Message
From
06/07/2003 14:29:37
Keith Payne
Technical Marketing Solutions
Florida, United States
 
 
To
04/07/2003 09:33:54
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00806938
Message ID:
00807267
Views:
27
>Dear the expert,
>
>How to set textbox to only accept numerical value ..?
>
>Thanks
>
>Regards
>Winan

Winan,

You can't set an textbox to only accept a numerical value. You can either:

1. Test the .text property of the textbox for a numerical value during postback and inform the user that a numerical value is required.

2. Use a third-party product that provides a textbox that only accepts numerical values.

3. Write your own textbox custom control that includes javascript to intercept keystrokes and only allow digits, commas and a decimal point.

-----------------------

ASP.NET is limited by the HTML standard, as defined by the W3C (World Wide Web Consortium). The latest version, HTML 4.01, does not include a textbox with the kind of interactive control that a textbox in VFP or a Windows Forms .NET application has.
Previous
Reply
Map
View

Click here to load this message in the networking platform