0

I am new to MVC3. I have a task to create a page that shows a list of data. ie I created a controller "Employee", then 1 view "Employee" which was renamed from Index and a partial view "EmployeeList".

The Partial View is used for listing the Employees in a Grid.

I need to render this partial view from the View, on a click or load . How ?

Ufuk Hacıoğulları
  • 37,978
  • 12
  • 114
  • 156
Sreejesh Kumar
  • 2,449
  • 12
  • 51
  • 72
  • 1
    Did you even bother to search for a solution? possible duplicate of [how i can render Partial views in asp.net mvc 3](http://stackoverflow.com/questions/5441615/how-i-can-render-partial-views-in-asp-net-mvc-3) – James Jul 10 '12 at 13:48

1 Answers1

1

To render a partial view within another view:

@Html.Partial("EmployeeList")

To pass in a specific model to the view:

@Html.Partial("EmployeeList", Model.EmployeeListModel)
Dismissile
  • 32,564
  • 38
  • 174
  • 263