【发布时间】:2015-01-29 10:52:41
【问题描述】:
我有一个简单的问题:使用剑道窗口,我可以这样刷新它:
window.refresh({
url: '@Url.Action("_EditScheduleInspectionForm", "TLM")',
我想将参数传递给该控制器动作。我尝试了以下方法并且有效:
window.refresh({
url: '@Url.Action("_EditScheduleInspectionForm", "TLM", new { test = "test"})',
控制器
public PartialViewResult _EditScheduleInspectionForm(string test)
test 变量由传递的字符串“test”填充。但我不想硬编码字符串,我想在那里传递一个 javascript 变量,例如:
var test = "something";
window.refresh({
url: '@Url.Action("_EditScheduleInspectionForm", "TLM", new { test = test})',
但上述不起作用,变量无法识别。我怎样才能做到这一点?
【问题讨论】:
标签: javascript asp.net-mvc kendo-ui kendo-window