How do I render the partial view using jquery?
We can render the partial View like this:
<% Html.RenderPartial("UserDetails"); %>
How can we do the same using jquery?
How do I render the partial view using jquery? We can render the partial View like this:
How can we do the same using jquery?
|
||||
|
I have used ajax load to do this:
|
|||||
|
You can't. You can, however, call a method (action) that will render the partial view for you.
where the user controller has an action named details that does:
|
|||||||
|
You'll need to create an Action on your Controller that returns the rendered result of the "UserDetails" partial view or control. Then just use an Http Get or Post from jQuery to call the Action to get the rendered html to be displayed. |
|||
|