Hi everybody,
Today I try to add some ajax into my module. Im using ASP.NET AJAX for .net 2.0. In section of module, everylink button run well in first time clicked. But after that, i click it again, a hard to understand was found: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 404
Would anyone meet this problem or have any idea to solve it?
Thanks!
P/s: I was added ScriptManager into template ascx file like follow:
(asp: ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"
LoadScriptsBeforeUI="true" ScriptMode="Release" )
(/asp: ScriptManager)
I was google it again, and found this:
http://www.cuyahoga-project.org/13/view.aspx?g=posts&t=1050
Maybe I try to using CUY's Web Extensions
Yes, check out Cuyahoga.Web.Extensions. It contains a form control adapter that should fix your issue. The issue exists because ASP.NET AJAX and url rewriting don't play very nicely together.
I did this a while ago.
I have just tried to add AJAX functionality to my module and it works without any issue and only took about a minute to set up. Forgive me if I am missing something but I can not see the problem (so far anyway :) )
Pre-req: First create a panel in your VS2005/VS2008 Toolbox and add the MS AJAX stuff. You can also download and add the AJAX Control Toolkit to another panel.
This is what I did.
1) Add (drag and drop it) 'ScriptManager' to template as first control inside the form tag.
(form id="t" method="post" runat="server")
(asp:ScriptManager ID="ScriptManager1" runat="server")(/asp:ScriptManager)
2) Add (drag and drop it) 'ScriptManagerProxy' to first control in module.
(%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CatMod.ascx.cs" Inherits="Cuyahoga.Modules.CatMod.Web.CatMod" %)
(asp:ScriptManagerProxy runat="server")
(/asp:ScriptManagerProxy)
3) Add an 'UpdatePanel' to your control. Fill it with whatever controls you wish to use/databind.
4) Add an 'UpdateProgress' to the control and associate it with the updatepanel. Add the UpdateProgress message/animation to the UpdateProgress panel.
That's it. It works for me.
I have a gridview and some textboxes all posting and receiving data with the update panel showing (albeit quickly as it is locally running). The gridview is populating from a method that returns an IList from NHibernate.
Maybe it was just thought that there was an issue due to the forum posts. But
so far I have found none?
I have added multiple instances of the module to the page to see if that caused any issues. None. 3 module instances on the page and it works.
If there is an issue what is it? Am I missing it altogether?
From:
http://www.cuyahoga-project.org/home/forum.aspx?g=postmessage&m=5102
All of you are great! First time, i still have error because of forget copying App_Browsers folder. After do simple action, it run well.
Thank you much