[HttpGet]
public ActionResult Index()
{
TempData["temp"] = "any string";
return View();
}
[HttpPost]
public ActionResult Index()
{
string temp = (string)TempData["temp"];
// либо так: string temp = TempData["temp"].ToString();
return View();
}