I am new to MVC3. I am using razor.
I have a menu with 4 items.
With each click, a different partial view should open.
Could anyone help me out here..
Preferably, without using a controller on server side..
Thanks,
Aneesh
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Html.RenderPartial is what you need if you don’t what to use a controller:
http://msdn.microsoft.com/en-us/library/system.web.mvc.html.renderpartialextensions.renderpartial.aspx
If you want to render partial view using controller action then use Html.RenderAction:
http://msdn.microsoft.com/en-us/library/system.web.mvc.html.childactionextensions.renderaction.aspx
http://devlicio.us/blogs/derik_whittaker/archive/2008/11/24/renderpartial-vs-renderaction.aspx