Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

ValidatorCalloutExtender does not work in this very simple aspx file

$
0
0

When I leave the textbox txtFirstName empty and click the button only the text "Enter a name" from RequiredFieldValidator is displayed.So the ValidatorCalloutExtender does not have any effect on the displayed error message.

I use the AjaxControlToolkit for .NET 4.5 and I use VS 2013 Ultimate

In this some kind of bug it's a very basic page.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Modul_3.WebForm1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>

        <asp:Label ID="Label1" runat="server" Text="FirstName" />
        <asp:TextBox ID="txtFirstName" runat="server" />
          
        <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName" ErrorMessage="Enter a name" Display="Dynamic">
        </asp:RequiredFieldValidator>

        <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" Width="350px"
            TargetControlID="rfvFirstName">
        </asp:ValidatorCalloutExtender>

        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    </form>
</body>
</html>

//Tony


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>