Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


ValidatorCalloutExtender works but RangeValidator message also shows

Posted on 2011-05-04
Medium Priority
Last Modified: 2012-05-11
I have a gridview. Here's a part of it...

 <asp:TemplateField HeaderText="Unit Price" ItemStyle-Width="100px">
                            <asp:TextBox CausesValidation="true" CssClass="bf_textbox" ID="txtUnitPrice" AutoPostBack="true" runat="server"></asp:TextBox>
                            <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtUnitPrice" ErrorMessage="Invalid. Numbers and 2 decimals only." MaximumValue="99999999" MinimumValue="-9999999" Type="Currency">Invalid. Numbers and 2 decimals only.</asp:RangeValidator>
                            <cc1:ValidatorCalloutExtender ID="RangeValidator1_ValidatorCalloutExtender" runat="server"
                                Enabled="True" TargetControlID="RangeValidator1">
                        <ItemStyle Width="100px" />

PROBLEM: When I type in an invalid entry the ValidatorCalloutExtender AND the text for the RangeValidator appears. I only want to see the callout message. How can I do this? I do NOT want to see the RangeValidator message. Thanks.
Question by:RobertNZana
  • 2
LVL 83

Accepted Solution

CodeCruiser earned 2000 total points
ID: 35694371
Add "Display=None" to the rangevalidator.
LVL 83

Expert Comment

ID: 35694374

Author Closing Comment

ID: 35694709
Enjoy the easy points. Thanks!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

575 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