Last post Mar 27, 2012 11:17 PM by CodeHobo
Mar 27, 2012 10:35 PM|atllocal74|LINK
If I have a 2 pages both using the same layout page, is there a way I can navigate between the 2 pages and only refresh the body part of the layout page. For example if I have a list page and select an item to go to the detail page and they both contain
the same layout view, I don't want the layout which contains the menu to reload, just the page containing the layout view similar to a partial page postback. Thanks.
Mar 27, 2012 10:43 PM|CodeHobo|LINK
Mar 27, 2012 11:08 PM|atllocal74|LINK
Thanks for the response. I'm using MVC 3, so I guess I would need to go the manual Jquery route. I'm a little confused on how to do this using a layout. Are you suggesting not using a layout and have the layout be the view and return each page as a partial
view within a page, or is there some other way to do this. Each view in my application is using a layout like below. Can you give me an example of how to do this with jquery?
Mar 27, 2012 11:15 PM|ignatandrei|LINK
I'm a little confused on how to do this using a layout.
Please see http://bit.ly/mvc_ajax_jquery
Mar 27, 2012 11:17 PM|CodeHobo|LINK
No you would still use a layout, but wrap the views in a div tag on the layout page. Then write a little big of jquery to intercept any links and instead of redirecting the page there, load the page via an ajax request and put the results into the div replacing