ValidatorCalloutExtender works but RangeValidator message also shows

Posted on 2011-05-04
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
    LVL 83

    Accepted Solution

    Add "Display=None" to the rangevalidator.
    LVL 83

    Expert Comment

    LVL 9

    Author Closing Comment

    Enjoy the easy points. Thanks!

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    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…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video discusses moving either the default database or any database to a new volume.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now