Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1284
  • Last Modified:

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

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
Daniel Wilson
Asked:
Daniel Wilson
  • 2
  • 2
1 Solution
 
Bane83Commented:
0
 
Daniel WilsonAuthor Commented:
Yes, I do.  The last website I worked on, using this machine, I added AJAX stuff just fine.
0
 
Bane83Commented:
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
 
Daniel WilsonAuthor Commented:
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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now