I have an action I call from an anchor thusly, Site/Controller/Action/ID
where ID
is an int
.
Later on I need to redirect to th
MVC 4 example...
Note that you do not always have to pass parameter named ID
var message = model.UserName + " - thanks for taking yourtime to register on our glorious site. ";
return RedirectToAction("ThankYou", "Account", new { whatever = message });
And,
public ActionResult ThankYou(string whatever) {
ViewBag.message = whatever;
return View();
}
Of course you can assign string to model fields instead of using ViewBag if that is your preference.