2011-05-04 75 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