AJAX problems

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
 
M

Mark Fitzpatrick

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>
 
C

Cowboy \(Gregory A. Beamer\)

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.
 
C

Cubaman

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top