Visual Studio .NET - 'Sys' is undefined Javascript Error - (ASP.NET Ajax Extensions 1.0)

Asked By c g
31-Jan-07 08:49 AM

I am using the  ASP.NET Ajax Extensions 1.0

 Below is my aspx and codebehind. There is literally nothing on my page.

When I run my page I get a Javascript error 'Sys' is undefined.

 Anyone have any idea why?

 

<%@ Page Language="C#" MasterPageFile="~/MasterPages/Main.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<asp:ScriptManager id="ScriptManager1" runat="server">

</asp:ScriptManager>

 

<asp:UpdatePanel id="UpdatePanel1" runat="server">

<ContentTemplate>

 

</ContentTemplate>

</asp:UpdatePanel>

 

</asp:Content>

 

Below is my codebehind

 

 

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

 

 

public partial class _Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

}

 

web.config  web.config

31-Jan-07 08:54 AM

Do you have the proper items in your webconfig file?

You need

<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>

in

<system.web>

   <httpHandlers>

Still get error  Still get error

31-Jan-07 09:04 AM

Here is my Web.config I still get an the same Javascript error

 

<?xml version="1.0"?><configuration>

<appSettings/>

<connectionStrings/>

<system.web>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

-->

 

<httpHandlers>

<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>

</httpHandlers>

<compilation debug="true">

<assemblies>

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

-->

<authentication mode="Windows"/>

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

-->

</system.web>

</configuration>

Try this  Try this

31-Jan-07 01:00 PM
  1. remove

    <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

    Namespace="System.Web.UI" TagPrefix="asp" %>

  2. Add below code  between <system.web> element in web.config

    <pages>

    <controls>

    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </controls>

    </pages>

    <compilation debug="false">

    <assemblies>

    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </assemblies>

    </compilation>

    <httpHandlers>

    <remove verb="*" path="*.asmx"/>

    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

    </httpHandlers>

    <httpModules>

    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </httpModules>

    </system.web>

    Good luck

'Sys' is undefined  'Sys' is undefined
31-Jan-07 11:05 PM
Try the fix mentioned in this blog posting if you are using Windows 2003 as your web server -
http://aspadvice.com/blogs/sswafford/archive/2007/01/25/ASP.NET-AJAX-v1.0-Sys-is-undefined-error.aspx

 

  Leandra replied to Atef Sahloul
11-May-10 05:32 PM
This worked beautifully, thank you
  Rajiv replied to c g
19-Jun-10 02:32 AM

Dear,

 

 this is use to ajax tool kit problam

please just add following lines in web config fil

 

-----------------

<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
</system.webServer><system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
</system.webServer>

------------------------------------

iif any problam just send email to my id

doonraj01@gmail.com

Create New Account
help
Frequently asked Interview Questions in ADO.Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B B) What is concept of Boxing and Unboxing ? (B) What is the difference between VB.NET and C#? (I) what is the difference between System exceptions and Application exceptions? (I)What is CODE Access security? (I)What is a satellite assembly? (A) How to prevent my .NET DLL to be decompiled? (I) what is the difference between Convert.toString and .toString () method assembly in GAC how do we make a choice? (A)What is CodeDom? Chapter 2: NET Interoperability (I) How can we use COM Components in .NET? (I) We have developed the
ajax enabled site how do i get ajax enabled site in my .net 2.0. . .which setup i have to install for this. . i installed lots of setups for ajax to get ajax enabled site when i open new website. . .but i dint get. . .anybody pls tell me thanks in advance Hi Want to install ASP.NET AJAX and get started ? see this solution Installing ASP.NET AJAX Introduction This topic describes how
ASP.NET Ajax client-side framework failed to load Hi Everyone, Was getting ASP.NET Ajax client-side framework failed to load error while loading web-page after deploying in productions server. Had installed asp.net 2.0 ajax extension 1.0
Redirecting from Classic ASP to .Net aspx page hi, i am not able to redirect to that classic ASP page, error is coming. < td align = "left"> < asp : LinkButton ID = "wlnkProductCode" runat = "server" Text = ' <%#Eval("ProductCode")%> ' OnClientClick = "javascript:return OpenProdDetails(this);" Width = "100px"> < / asp : LinkButton > < / td > function OpenProdDetails(id) { window.open( 'caf_nonmpg_peg_new.asp aim of the redirect would be to allow a developer to use the features of ASP.NET and use the data from Sage CRM using the SOAP web services which in turn be explict, here is some example code. This code shows how a classic COM ASP page could redirect to an ASPX page. 1 <!- - #include file = "sagecrm.js"- -> 2 <% 3 Response.Redirect
AJAX Installation Hi My asp.net code not supporting AJAX , which I installed later. How I drag AJAX into my code. while debugging, it shows "Element 'Script manager' is not a known element do. thanks. Regards, Sangeetha Untitled document Make sure you have added the dll and the ajax registration in Bin directory and the web.config file : 1. INSTALL ajaxtoolkit : steps 2. Add config inside Controls node: < controls > < add tagPrefix = " cc1 " namespace = " System.Web.UI " assembly = " System.Web.Extensions, Version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 " / > < add namespace = " AjaxControlToolkit " assembly = " AjaxControlToolkit " tagPrefix = " cc1 " / > < / controls > Hi, AJAX Website http: / / st-curriculum.oracle.com / obe / db / hol08 / apexweb20 / ajax_otn.htm http: / / www.oracleapplicationexpress