AJAX problems

  • Thread starter Thread starter Steve Kershaw
  • Start date Start date
S

Steve Kershaw

Hey,
I have a master.page and a Default.aspx page. I'm trying to use AJAX
to postback to the server. However, when I place the
<asp:ScriptManager ...> tag on the Default.aspx page I get an "Element
'ScriptManager' is not a known element. This can occur if there is a
compilation error on the Web site." on the mouse-over.

What is the prblem here? Am I missing something?

Thanks
Steve
 
It sounds as if you're using an existing web and haven't made the changes in
your web.config file that are necessary.

If you create a new asp.net ajax project you'll see some additional items in
it's web.config that you'll need to put in any application that you need.
Add the following to your web.config

<httpHandlers>

<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>
 
Did you make an AJAX website, or simply add AJAX to an existing website.
There are some registration tags for the web.config that are mandatory for
using AJAX in an ASP.NET site.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
Hey,
I have a master.page and a Default.aspx page. I'm trying to use AJAX
to postback to the server. However, when I place the
<asp:ScriptManager ...> tag on the Default.aspx page I get an "Element
'ScriptManager' is not a known element. This can occur if there is a
compilation error on the Web site." on the mouse-over.

What is the prblem here? Am I missing something?

Thanks
Steve
In webconfig
<location path="ScriptResource.axd">
<!--Allow acces to ajax scripts-->
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<system.web>
<!--Ajax Handlers-->
<httpHandlers>
<add verb="GET" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>

Best regards,
Oscar Acosta
 
Back
Top