Cloud and Microsoft technologies enthusiast architect in Switzerland RSS 2.0
# Monday, May 28, 2007

Preparing a presentation about AJAX and a comparison between the Microsoft world and the other (basically the rest of the world...), I went to an issue I did not expect, because I thought it would be more automatic.

When you add a ScriptManager and an UpdatePanel to a web page, the first times you will run the application, there are chances that the "'Sys' is undefined" Javascript error occurs. Not only the Javascript error is shown, but when you click on, let say a button in your UpdatePanel, this will post the page back to the server, updating the whole page.

This is because in the HTML code, the Sys.Application.Initialze function is called close to the end of the code. The problem is that the resource files containing the Javascript code are coming and downloaded from the server using a .axd file (ScriptResource.axd, more precisely).

To fix this issue, the line below has to be added in the web.config file under the <httpHandlers> section :

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

Monday, May 28, 2007 6:50:49 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -

All comments require the approval of the site owner before being displayed.
Please login with either your OpenID above, or your details below.
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
Google Cloud Platform Certified Professional Cloud Architect
Ranked #1 as
French-speaking SharePoint
Community Influencer 2013
Currently Reading :
I was there :
I was there :
I was exhibiting at :
I was there :
I was a speaker at :
I was a speaker at :
I was a speaker at
(January 2013 session):
I was a speaker at :
I was a speaker at :
United Nations (UN) SharePoint Event 2011
I was a speaker at :
I was there !
I was there !
I was there !
I was there !
<August 2022>
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2022
Yves Peneveyre
Sign In
Total Posts: 290
This Year: 0
This Month: 0
This Week: 0
Comments: 20
Pick a theme:
All Content © 2022, Yves Peneveyre
DasBlog theme 'Business' created by Christoph De Baene (delarou)