Site icon Dax Judy

CODE LIBRARY: MVC Ajax Partial View Load

Used this while building a primary search View that loads results into a partial view.

$.ajax(
{
type: “GET”, //HTTP GET Method
url: ‘/Controller/Method’,
cache: false, 
data: { //Passing data
param1: value1
, param2: value2
}
})
.success(function (result) {
     $(‘#divTarget’).html(result);
});

Exit mobile version