2011-05-04 27 views

回答

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"); 
+0

如何可以在指定一个部分是码? – 2011-05-04 12:23:25

+0

你走了。但跆拳道你想要做什么?! – UpTheCreek 2011-05-04 12:26:47

+0

谢谢,aweseome :) – 2011-08-06 09:55:34