I want to pass a parameter when redirecting to an action, and then bind that parameter to the model. Here is what I have so far, can anybody tell me how to do this?
The action that is doing the redirect uses this statement :
return RedirectToAction("TwinWithFacebook", new { id = facebookID });
Then my get is :
[HttpGet]
public ActionResult TwinWithFacebook(long id)
{
//use viewdata to store id here?
return View();
}
And my post :
[HttpPost]
public ActionResult TwinWithFacebook(FacebookConnectModel fbc)
{
//assign this here?
//fbc.facebookId = id;