我正在使用MVC,並且正在檢查後端(控制器)上的情況。 我想在一個Jquery模式框中顯示消息,它將從後端(控制器)觸發。如何在MVC中顯示來自控制器的jquery消息
任何人都可以告訴我如何做到這一點。
我試圖使用下面的代碼,但這是給我一些消息:無效的參數。
string scriptstring = "$(function(){initializedialog();showDialog(\"" + "Please answer to all the Question." + "\");});";
ScriptManager.RegisterStartupScript(this, typeof(Page), "test", scriptstring , true);
你能告訴我怎麼用上面的語句在MVC
感謝
嘗試製作使用Ajax。 – ssilas777
我不想使用它。 –
在TempData中傳遞一些標誌值更多信息http://www.squaredroot.com/2007/12/20/mvc-viewdata-vs-tempdata/ – Amit