Solved

FilteredTextBoxExtender works but want to exclude zero

Posted on 2013-01-15
1
1,032 Views
Last Modified: 2013-01-15
I have a FilteredTextBoxExtender that allows numbers. Is there anyway to change it to alow numbers but not zero?

 <ajaxToolkit:FilteredTextBoxExtender ID="ftbe" runat="server"
                TargetControlID="txtPrice"         
                FilterType="Numbers"         />

Open in new window

0
Comment
Question by:Camillia
1 Comment
 
LVL 21

Accepted Solution

by:
masterpass earned 500 total points
ID: 38780592
I don't think you can exlude zero unless you are going tp write a custom valdiator and validate the input since zero IS A number.

Another option would be to use a masked edit extender with a validator and set the max and min values in the extender.

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/MaskedEdit/MaskedEdit.aspx

My personal choice would be to write a asp customvalidator or a asp rangevalidator and then validating the user input. That way you will have control over the data.

Hope this helps.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question