-
pagemethods
I am using PageMethods in my javascript to call a function in my c# code which is static. In that code, all I have was "response.redirect("default.aspx").. but somehow it never gets redirected. It just stays there.
Code:
function testredirect()
PageMethods.Navigation()
C# code:
Public static void Navigation()
Response.redirect("Default.aspx");
-
Re: pagemethods
Hey,
Have you set the EnablePageMethods property of the ScriptManager to True? Have you decorated the method with the appropriate attribute?
See here:
http://www.singingeels.com/Articles/...PNET_AJAX.aspx
Gary
-
Re: pagemethods
Response.Redirect means nothing in ASP.NET AJAX. With PageMethods, you're using javascript to talk to a page, but a response.redirect is only relevant to a browser. If you want the page to redirect, send some javascript to the page using ScriptManager.RegisterStartupScript.
document.location.href='page9.aspx';