Marcus25
Marcus25

Reputation: 883

How to render multiple partial views without using Controller on the server side?

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

Upvotes: 0

Views: 3591

Answers (2)

LockTar
LockTar

Reputation: 5465

You have to create an object where all the data that you want show on the all the different partial views. Then use @Html.RenderPartial to render your desired partial. Use the second parmater to add the data.

Example: @{Html.RenderPartial("_Customers", Model.CustomerList);}

Upvotes: 0

Related Questions