【发布时间】:2024-05-23 08:15:01
【问题描述】:
我正在使用 MVC,并且正在检查后端(控制器)上的条件。 我想在将从后端(控制器)触发的 Jquery 模式框中显示消息。
谁能告诉我如何做到这一点。
我尝试使用以下代码,但这给了我一些信息:无效参数。
string scriptstring = "$(function(){initializedialog();showDialog(\"" + "Please answer to all the Question." + "\");});";
ScriptManager.RegisterStartupScript(this, typeof(Page), "test", scriptstring , true);
你能告诉我如何在MVC中使用上面的语句
谢谢
【问题讨论】:
-
尝试使用 Ajax。
-
我不想用它。
-
在 TempData 中传递一些标志值以获取更多信息squaredroot.com/2007/12/20/mvc-viewdata-vs-tempdata
标签: asp.net-mvc asp.net-mvc-3 model-view-controller