我設置TempData的價值在不同的控制器之一的ActionResult,並試圖把他們的鑰匙在另一個控制器的ActionResult如何獲得TempData的伯爵或鍵入另一個的ActionResult
public ActionResult DealProducts(FormCollection form)
{
TempData["check"] = "DealUpdated";
}
在只是計數另一個控制器
public ActionResult CustomizedBudget()
{
var temp = TempData["doc"];
var temp = TempData["doc"].Key;//like this
if (temp.Count > 0) // or trying to get like this, but not
}
'TempData.ContainsKey(「doc」)'? – haim770
尚未完成,你試圖做什麼! –
在哪裏得到我TempData的價值'DealUpdated' – user6594294