Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1100
  • Last Modified:

FilteredTextBoxExtender works but want to exclude zero

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
Camillia
Asked:
Camillia
1 Solution
 
masterpassCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now