I need to send data before making a "RedirectToAction" to the new view, and do not want the data being sent by "GET".
The only thing I can think of is to keep this information in session before redirecting to the new view, but I prefer to do otherwise.
Thanks.
Edit width example
public class AccountController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult Login()
{
return View(new LoginViewModel());
}
[HttpPost]
public ActionResult Login(LoginViewModel model, string returnUrl)
{
if (LoginModel.Login(model)){
UserData ud = UserData(model.IdUser);
return RedirectToAction("Index", "Information");
}
// code
}
}
//
public class InformationController : Controller
{
public ActionResult Index()
{
//receives "ud" information
// ...
return View();
}
}