Render Partial View Using jQuery in ASP.NET MVC

后端 未结 8 2143
有刺的猬
有刺的猬 2020-11-22 11:13

How do I render the partial view using jquery?

We can render the partial View like this:

<% Html.RenderPartial(\"UserDetails\"); %>
         


        
8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 11:40

    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.

提交回复
热议问题