Solved

Addition of ScriptManager causes Javascript errors -- AJAX controls don't work

Posted on 2008-10-22
4
1,278 Views
Last Modified: 2009-04-08
I am modifying an ASPX page and it needs a bit of AJAX to improve the user experience.  I'm trying to add a couple calendar extenders and move a datagrid into an update panel.

But without those components even being added, the presence of the ScriptManager causes IE to show the "Done, but with errors on page" icon.  Double-clicking it shows:
Line: 297
Char: 1
Error: 'Sys' is undefined
Code: 0

If I do include the AJAX controls, they don't work.

I just reverted the page ... verified no error ... added JUST the ScriptManager ... and got the javascript error again.

Any ideas on this?

thanks!
0
Comment
Question by:Daniel Wilson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:Bane83
ID: 22778065
0
 
LVL 32

Author Comment

by:Daniel Wilson
ID: 22778105
Yes, I do.  The last website I worked on, using this machine, I added AJAX stuff just fine.
0
 
LVL 10

Accepted Solution

by:
Bane83 earned 500 total points
ID: 22778284
Ah, duh.  Didn't register that you're converting a non-ajax website to ajax.  You'll need to add a few things to the web.config for this to work.

There are two key tags, that must exist on web.config:

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

under <httpHandlers>
<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
0
 
LVL 32

Author Comment

by:Daniel Wilson
ID: 22778830
Very, very close.  Don't know why I forgot having to deal w/ that before ...

the block that worked for me was:


      <httpHandlers>
          <remove verb="*" path="*.asmx"/>
          <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>

Thanks for your help!
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question