jQuery AJAX works to return mvc 3 partial view but jQuery load doesn't

后端 未结 3 2259
挽巷
挽巷 2021-01-25 13:13

I\'m trying to populate a div with a partial view in MVC 3. My controller looks like this:

[HttpPost]
public ActionResult GetCustomerList(string searchString)
{         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-25 13:15

    Can you try this to see if it works?

    function getCustomerList(searchCriteria) {
    
             $('#customerTabBody').load('@Url.Action("GetCustomerList", "Home")', { 'searchString': searchCriteria });
    
    };
    

提交回复
热议问题