0
A
回答
4
Dictionary<string, object> tempDataDictionary = Context.Session["__ControllerTempData"] as Dictionary<string, object>;
if (tempDataDictionary == null)
{
tempDataDictionary = new Dictionary<string, object>();
}
**tempDataDictionary["TopMessage"] = message;
tempDataDictionary["FromUnauthorized"] = true;
HttpContext.Current.Session["__ControllerTempData"] = tempDataDictionary;**
Server.ClearError();
Response.Redirect("~/Account/LogOn");
相關問題
- 1. 在ASP.NET中設置Global.asax主頁面
- 2. 從HttpContext.Current訪問TempData
- 3. 從Global.asax中
- 4. 將javascript參數設置爲viewdata,tempdata中的鍵?
- 5. 處理配置錯誤 - global.asax?
- 6. 從Global.asax文件重定向
- 7. 從Global.Asax調用ThreadPool.QueueUserWorkItem Application_Startup
- 8. 的Server.Transfer從Global.asax中的Application_Error
- 9. 從IIS更改Global.asax變量
- 10. WCF服務的Global.asax的「生成操作」設置是否正確?
- 11. 在Global.asax中設置會話變量會導致AJAX錯誤
- 12. 此Global.asax路由設置有什麼問題?
- 13. 的TempData在FileContentResult
- 14. TempData:安全嗎?
- 15. 避免TempData MVC
- 16. TempData&Redirect for Errors
- 17. MVC TempData issue
- 18. TempData和模式
- 19. 從非控制器類添加到TempData
- 20. TempData從視圖移動到控制器
- 21. global.asax nlog
- 22. ServiceStack內置概要分析沒有Global.asax
- 23. 如何測試在MVC 2中設置了TempData的地方有重定向?
- 24. 訪問TempData變量
- 25. ASP.NET flash/TempData內存
- 26. TempData的持久性
- 27. TempData []獲取擦除
- 28. ASP.NET MVC ViewBag或TempData?
- 29. 設置從JSP
- 30. 創建Global.asax中的靜態對象,從
如何可以在指定一個部分是碼? – 2011-05-04 12:23:25
你走了。但跆拳道你想要做什麼?! – UpTheCreek 2011-05-04 12:26:47
謝謝,aweseome :) – 2011-08-06 09:55:34