2017-04-10 114 views
0

我需要一些幫助。 所以我試圖從相同的列表模型調用很多部分視圖,每個使用不同的過濾器。無論如何,我會將視圖中的Datafilter值傳遞給模型嗎?在部分視圖中設置數據過濾器

+0

爲此使用JQuery.Ajax。 –

+0

你可能會詳細說明嗎? –

+0

這是模型中充當DataFilter的方法。我需要在每個部分中設置TableName –

回答

0
$(document).ready(function() { 
    // Add the page method call as an onclick handler for the div. 
    $("#Result").click(function() { 
    $.ajax({ 
     type: "POST", 
     url: "ControlerFolder/Controler", 
     data: {someParameter(Filter): "value"}, 
     contentType: "application/json; charset=utf-8", 
     dataType: "json", 
     success: function(msg) { 
    msg is the json that you can return 
     } 
    }); 
    }); 
}); 

如果你需要更多的幫助說點什麼。