views:

250

answers:

1

I have a page with jquery tabs in which the user can update their Profile, Password, General in each tab.

When a user update the details in "General" tab, the post action will be called and it should retain the "General" tab back.

It can be accessed directly by calling like http://localhost:8742/User/Settings/10#General. In the url 10 is the user id.

How can i use the RedirectToAction in my asp.net mvc (C#) application to retain the "General" Tab.

I have tried like:

return RedirectToAction("Settings#General", new { Id= _user.Id });

But the above one doesn't works as it has routeValues in it. How can i retain the jquery tab after post action using RedirectToAction with routeValues ? Or How can i rewrite my above RedirectToAction to accomplish this?

+2  A: 

See here for a possible solution.

Hope this helps.

madcapnmckay
this is exactly i m looking for.
Prasad