Dynamically load Partial Views

后端 未结 6 1000
醉话见心
醉话见心 2020-12-14 16:58

How can i dynamically load a Partial View?

I mean I have this view, lets say ListProducts, there I select some dropdownlists with products, etc, and wit

6条回答
  •  不思量自难忘°
    2020-12-14 17:41

    Use Ajax :)

    http://api.jquery.com/jQuery.ajax/

    Example:

    $.post(window.gRootPath + "Customer/PartialView", { Question: questionId})
    .done(function (data) {
        $('#partialDiv').html(data.responceText);
    });
    

提交回复
热议问题