I used ScriptManager in .aspx page to Maintain URL history in .Net i.e.
on aspx page i put this script after form tag
> <asp:ScriptManager runat="server" ID="ScriptManager1" EnablePartialRendering="true"
> EnableHistory="true">
> </asp:ScriptManager>
and in my .js file i put this code
Sys.Application.add_navigate(function (sender, e) {
navigate(sender, e);
});
Sys.Application.addHistoryPoint(objOut, null);
Now same thing i want to use in MVC 4 with Razor
I used MicrosoftAjax.js for ScriptManager and .js code is same. but i am getting issue on callback.
let me explain you with example:
suppose Actual URL is
www.websitename.com/cat/30/
anchor tag link on page is
www.websitename.com/cat/30/?q=10
once callback perform anchor tag link becomes
www.websitename.com/?q=10
I mean after callback "cat/30/" is missing from link.
can anyone tell me what I am doing wrong.
Thanks.
Ashu
ScriptManager
is part ofASP.NET Webforms
. It is not available inASP.NET MVC
. They are two completely different frameworks.There is a port of
ScriptManager
toASP.NET MVC
which is available here. It might provide what you are looking for.