'Sys' is undefined in Ajax webform

i try to find the fix for the error

'Sys' is undefined

 <script language="javascript" type="text/javascript">
       
        Sys.Webforms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
        Sys.Webforms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

        function BeginRequestHandler() {
            var myLoaderDiv = $get("loader01");
            var myLoaderDiv1 = $get("loader02");
            myLoaderDiv.style.visibility = "visible";
            myLoaderDiv1.style.visibility = "visible";
        }

        function EndRequestHandler() {
            var myLoaderDiv = $get("loader01");
            var myLoaderDiv1 = $get("loader02");
            myLoaderDiv.style.visibility = "hidden";
            myLoaderDiv1.style.visibility = "hidden";
        }
   

    </script>
web.config
----------
<httpHandlers>
      <add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
		</httpHandlers>

Open in new window

LVL 1
doramail05Asked:
Who is Participating?
 
doramail05Connect With a Mentor Author Commented:
it may cause by the template is not ajax support,

now already successful developed ajax-enabled with sys
0
 
informaniacCommented:
Make sure ajax is installed on your machine and u have a reference to the AjaxControlToolkit dll in your project(if you are using toolkit controls)
0
 
doramail05Author Commented:
i placed the <script type="javascript" > into after form tag and it solved,
but now it has this eror :

'Sys.WebForms.PageRequestManager' is null or not an object
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
doramail05Author Commented:
added

<xhtmlConformance mode="Transitional"/>

into <system.web> in web.config and still
0
 
rameshrrCommented:
did you add ScriptManager into the page?
try adding this tag

<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
0
 
doramail05Author Commented:
yes, did put it.

..
<asp:ScriptManager ID="ScriptManager1" runat="server" />
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
..
0
All Courses

From novice to tech pro — start learning today.