How to call partial view using JQUERY in MVC

Smith
Smith
None
2568 Points
74 Posts

Hi,

How to call partial view using JQUERY

Views: 8556
Total Answered: 2
Total Marked As Answer: 1
Posted On: 27-May-2015 03:16

Share:   fb twitter linkedin
Answers
Brian
Brian
Moderator
2232 Points
14 Posts
         

Hi Smith,

You can use ajax call and set dataType: "html".

$.ajax({
url:'/ProductManagement/LoadProducts',
dataType:"html",
success:function (data) {
 
//$('#ProductsDiv').html(data);
}
});

 

Posted On: 27-May-2015 09:07
Mayank
Mayank
Member
194 Points
12 Posts
         

You can use ajax load to do this:

  $('#user_content').load('@Url.Action("ActioNname", "ControllerName")');
Posted On: 18-Feb-2016 21:52
 Log In to Chat