8

I'm pretty new to ASP.NET MVC so peace if I'm asking something stupid. The problem is, when I'm redirecting from the LogOn method it does not update the URL in the browser properly

 public ActionResult LogOn(LogOnModel model, string returnUrl)
        {
          return RedirectToAction("Index", "Menu");
        }

and although it renders the content from the Menu/Index view, the url remains

http://localhost/App/account/logon#/WMSMobileWeb/account/logon

where it should have been,

http://localhost/App/Menu/Index

I'm using Razor view engine with Layouts and with JQuryMobile. Any idea?

/Bumble Bee

Illuminati
  • 4,539
  • 2
  • 35
  • 55
  • I have exact same problem Bumble Bee, Did u solve using below suggestion? or got something using MVC/JQueryMobile. -- thanks – Anand Jul 15 '11 at 12:22
  • the below solution worked for me. It was basically the ajax requests that made the url problem. – Illuminati Jul 15 '11 at 12:33

1 Answers1

5

It seems, that you are calling this action using Ajax, that's why your URL doesn't change. This question basically covers what you need to do redirects with Ajax approach

Community
  • 1
  • 1
ionoy
  • 975
  • 6
  • 19
  • What was the solution that you implemented? I have the exact same issue. Thanks – David Sep 28 '11 at 15:47
  • @David It looks like redirection has to be done client side... I'm going through the same thing... or turn of AJAX handling. – Brian Mains Nov 24 '11 at 00:17