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

x
?
Solved

ValidatorCalloutExtender works but RangeValidator message also shows

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

 <asp:TemplateField HeaderText="Unit Price" ItemStyle-Width="100px">
                        <ItemTemplate>
                            <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">
                            </cc1:ValidatorCalloutExtender>
                        </ItemTemplate>
                        <ItemStyle Width="100px" />
                    </asp:TemplateField>

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.
0
Comment
Question by:RobertNZana
  • 2
3 Comments
 
LVL 83

Accepted Solution

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

Expert Comment

by:CodeCruiser
ID: 35694374
0
 
LVL 9

Author Closing Comment

by:RobertNZana
ID: 35694709
Enjoy the easy points. Thanks!
0

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