ajax control toolkit 15.1.3 sys undefined RRS feed

  • Question

  • User-74863099 posted

    I gotten one website that I downloaded to work with the autocomplete extender.  I then created a new data scaffolding website using an ADO entity model.  I have created a custom list form, which was generated by the data scaffolding, and am trying to put an autocomplete extender on it.  I get a sys undefined error in internet explorer.  I go into the debugger and see the error.

    Sys.Application.add_init(function() {
    $create(Sys.Extended.UI.AutoCompleteBehavior, {"completionSetCount":100,"delimiterCharacters":"","enableCaching":false,"id":"txtName_AutoCompleteExtender","minimumPrefixLength":2,"serviceMethod":"GetDevelopments","servicePath":"/SewerCleaningHeaders/List.aspx","useContextKey":true}, null, null, $get("ContentPlaceHolder1_txtName"));

    sys undefined.

    I downloaded the the 15.1.3 version of ajax control tookit.  It has done away with toolkit script manager and replaced it with scriptmanager.  Which is what I needed because the page generated by the datascaffolding already has a script manager in the site master.  

    The code for the site master is as follows:

    <%@ Master Language="VB" CodeFile="Site.master.vb" Inherits="Site" %>

    <%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>

    <!DOCTYPE html>

    <html lang="en">
    <head runat="server">
    <meta charset="utf-8" />
    <title>Dynamic Data Site</title>
    <link href="~/Site.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder id="head" runat="server">

    <h1 class="DDMainHeader">Dynamic Data Site</h1>
    <div class="DDNavigation">
    <a runat="server" href="~/"><img alt="Back to home page" runat="server" src="DynamicData/Content/Images/back.gif" />Back to home page</a>

    <form id="form1" runat="server">
    <%-- TODO: Enable partial rendering by setting the EnablePartialRendering attribute to "true" to provide a smoother browsing experience.
    Leaving partial rendering disabled will provide a better debugging experience while the application is in development. --%>

    <asp:ScriptManager id=ToolKitScriptManager1 runat="server" EnablePartialRendering="False" >
    <asp:ScriptReference Path="~/Scripts/" Name="jquery" />
    <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" />

    the code in the custom form that I am only modifying is as follows ( with autocomplete extender on bottom)

    <%@ Page Language="VB" MasterPageFile="~/Site.master" CodeFile="List.aspx.vb" Inherits="List" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

    <%@ Register src="~/DynamicData/Content/GridViewPager.ascx" tagname="GridViewPager" tagprefix="asp" %>

    <asp:Content ID="headContent" ContentPlaceHolderID="head" Runat="Server">

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:DynamicDataManager ID="DynamicDataManager1" runat="server" AutoLoadForeignKeys="true">
    <asp:DataControlReference ControlID="GridView1" />

    <h2 class="DDSubHeader"><%= table.DisplayName%></h2>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <div class="DD">
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
    HeaderText="List of validation errors" CssClass="DDValidator" />
    <asp:DynamicValidator runat="server" ID="GridViewValidator" ControlToValidate="GridView1" Display="None" CssClass="DDValidator" />

    <asp:QueryableFilterRepeater runat="server" ID="FilterRepeater">
    <asp:Label runat="server" Text='<%# Eval("DisplayName") %>' OnPreRender="Label_PreRender" />
    <asp:DynamicFilter runat="server" ID="DynamicFilter" OnFilterChanged="DynamicFilter_FilterChanged" /><br />
    <br />

    <asp:EntityDataSource ID="GridDataSource" runat="server" EnableDelete="true" />
    <asp:Button ID="Button1" runat="server" Text="Search" />
    <br />
    <asp:GridView ID="GridView1" runat="server" DataSourceID="GridDataSource" EnablePersistedSelection="true"
    AllowPaging="True" AllowSorting="True" CssClass="DDGridView"
    RowStyle-CssClass="td" HeaderStyle-CssClass="th" CellPadding="6">
    <asp:DynamicHyperLink runat="server" Action="Edit" Text="Edit"
    />&nbsp;<asp:LinkButton runat="server" CommandName="Delete" Text="Delete"
    OnClientClick='return confirm("Are you sure you want to delete this item?");'
    />&nbsp;<asp:DynamicHyperLink runat="server" Text="Details" />
    <asp:HyperLinkField Text="Add" DataNavigateUrlFormatString="~/SewerCleaningHeaders/Insert.aspx" />

    <PagerStyle CssClass="DDFooter"/>
    <asp:GridViewPager runat="server" />
    There are currently no items in this table.

    <div class="DDBottomHyperLink">
    <asp:DynamicHyperLink ID="InsertHyperLink" runat="server" NavigateUrl=<%# table.GetActionPath("videolist", GetDataItem())%> Action="videolist"><img runat="server" src="~/DynamicData/Content/Images/plus.gif" />Insert new item</asp:DynamicHyperLink>


    <asp:Label runat="server" ID="lblReferrerName" Text="Address: "></asp:Label>
    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
    <asp:Label runat="server" ID="Label1" Text=" Select address and press button "></asp:Label>
    <asp:Button ID="Button2" runat="server" Text="Button" Width="67px" />

    <asp:AutoCompleteExtender ID="txtName_AutoCompleteExtender" BehaviorID="txtName_AutoCompleteExtender" runat="server"
    DelimiterCharacters="" Enabled="True"
    TargetControlID="txtName" MinimumPrefixLength="2" CompletionInterval="1000"
    EnableCaching="false" FirstRowSelected="false" CompletionSetCount= "100" ServiceMethod="GetDevelopments"

    <script src="~/Scripts/MicrosoftAjaxToolkit/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="~/Scripts/MicrosoftAjaxToolkit/Debug/AutoComplete.debug.js" type="text/javascript"></script>


    I've never actually made one of my exsisting website work with the ajax am I missing something?  I've worked on this for days and have tried many different things like copying the ajax control toolkit scripts, .js files to my website's scripts directory.  Is that the wrong way to do it.  They weren't there before. Tutorials that I've watched haven't even mentioned the script files but I saw it as one of the solutions.  

    Wednesday, September 16, 2015 2:45 PM

All replies

  • User61956409 posted

    Hi cemmons57,

    I've never actually made one of my exsisting website work with the ajax am I missing something?  

    Please refer to this link upgrade your exsisting project to AjaxControlToolkit v15.1.


    Best Regards,

    Fei Han

    Wednesday, September 16, 2015 9:27 PM
  • User-74863099 posted

    Fei Han

    The website that this error is occuring in is too large to attach.  I created another web form website.  I added the default page and 2 other pages from the website that I have that is working.  In the default page of my newly created website,  the autocomplete text box is not working but it works in the one I imported from. All I did was import the items and added ajax control toolkit 15.1.3 to the website with nuget.  I changed the toolkitscriptmanager to scriptmanager.  I'm not getting the sys undefined. But the autocomplete text box is listing script in the drop down box. Which I have seen before when I tried to create my first website from scratch.  Am I missing a step in making these website ajax control toolkit enabled.  This  sample website that I created reads an SQL database.  Will I be able to attach that for you to view and do I zip it up?  Please advise and thanks for your help.


    Thursday, September 17, 2015 12:15 PM
  • User-74863099 posted

    Fei Han,

    I thought I was replying to a different post.  One that requested me to send the website.  I looked at the link you sent and I had already seen it. I have uninstalled the existing ajax and reinstalled installed 15.1.3.   I changed to toolscriptmanager to scriptmanager.  The other stuff wasn't in my web.config.  I am still getting sys undefined.

    Thursday, September 17, 2015 2:15 PM
  • User-74863099 posted

    I also did step for of the link reference regarding bundling. I think that was working.  I still get sys undefined. Am I suppose to keep the bundling enabled?

    Thursday, September 17, 2015 2:35 PM
  • User1223857158 posted

    Hi cemmons57,

    This link explained this issue, maybe it will be helpful.


    With Regards,


    Friday, September 18, 2015 5:15 AM
  • User-74863099 posted

    I did this init.js but I get the error:

    Error: Unable to get property 'PageRequestManager' of undefined or null reference

    I'm not sure what the PageRequestManager is.  Is this something to get the ajax control toolkit working?

    Friday, September 18, 2015 12:41 PM