当前脚本:
var IrregularChartParams = InitializeChartParams();
// parametreleri json stringe cevir...
var chartParams = JSON.stringify(IrregularChartParams);
$.ajax({
url: '/Widget/GridExportToExcel',
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: chartParams,
....
控制器
public void GridExportToExcel(IrregularChartParams chartParams)
{
我想要以下内容:
// I know this does not work...
var url = '/Widget/GridExportToExcel' + chartParams
window.open(url);
使用模型绑定将 json 数据添加到 url 的简单方法是什么?