locked
Why is not ValidatorCalloutExtender working in VS 2013 web application RRS feed

  • Question

  • User1366894300 posted

    I have two machine.
    The first one has VS professional 2010I create a web application project and install AjaxControlToolKit 4.0 in the Toolbox and ValidatorCalloutExtender work as it should in this small snippet that is listed below.

    Now I do the same on another machine. I create a web application project where I have VS 2013 Ultimate and I install AjaxControlToolKit 4.5 in the Toolbox and now the ValidatorCalloutExtender doesn't work in spite having the identical program that is listed below.
    The bin directory is there and when I drag this control
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
    this
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
    is added

    When I run the page code listed below the ValidatorCalloutExtender doesn't do anything with the error message.
    It's only the ErrorMessage from RequiredFieldValidator that is displayed.
    I tried to add FilteredTextBoxExtender and this worked fine.

    If I use the whole solution project folder that I used on VS 2010 on VS 2013 it works fine because everying is inluded then.


    So is it anyone that have some suggestion to this problem ?
    The program looks like this
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebForm1.aspx.cs" Inherits="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>
     
         <label class="label" for="<%=txtOrderLev.ClientID%>">När vill du få dem levererade</label><br />
            <asp:TextBox ID="txtOrderLev" runat="server" />
            <asp:RequiredFieldValidator ID="RequiredFieldtxtOrderLev" runat="server"
                ErrorMessage="Ange datum enligt format (YYYY-MM-DD)" ControlToValidate="txtOrderLev"
                ForeColor="#FF3300" Display="Dynamic" />
            <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" Width="350px"
                TargetControlID="RequiredFieldtxtOrderLev" />
        <asp:Button ID="Button1" runat="server" Text="Button" />
        </form>
    </body>
    </html>

    //tony

    Sunday, April 13, 2014 1:36 PM

Answers

  • User1918509225 posted

    Hi Tojo,

    About your problem, i run your code in my computer,there is no error.

    My visual studio version is 2013,and ajaxControlToolkit version is 4.5 just like yours.

    Please check code below in your web.config:

         <controls>
            <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
            <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
          </controls>
    

    If it still doesn’t work,I suggest you reinstall AjaxControllerToolbox,and create new tab “AjaxControlToolbox” in the ToolBox,add  AjaxControlToolbox to  it.

     

    Hope it can help you.

    Best Regards,

    Kevin Shen.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 14, 2014 4:05 AM

All replies

  • User1918509225 posted

    Hi Tojo,

    About your problem, i run your code in my computer,there is no error.

    My visual studio version is 2013,and ajaxControlToolkit version is 4.5 just like yours.

    Please check code below in your web.config:

         <controls>
            <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
            <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
          </controls>
    

    If it still doesn’t work,I suggest you reinstall AjaxControllerToolbox,and create new tab “AjaxControlToolbox” in the ToolBox,add  AjaxControlToolbox to  it.

     

    Hope it can help you.

    Best Regards,

    Kevin Shen.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 14, 2014 4:05 AM