【发布时间】:2021-08-01 07:10:51
【问题描述】:
我一直在尝试在 JavaScript 中使用参数将页面重新加载到特定控制器的操作方法,但出现错误。
我的输出在我使用时有效
window.location.reload(true);
但我想用 PARAM 的值重定向到控制器的操作方法,我正在尝试这个
// Gives me the value in a function
var supId = data.supplierId;
//redirects the page so the I can see the updated the data
window.location.reload= '@Url.Action("GetSupplier", "Supplier", new { supplierId = supId })';
但这对我也不起作用。
谁能告诉我该怎么办
提前致谢。
【问题讨论】:
标签: javascript jquery asp.net-mvc model-view-controller client-side