Q:

MVC 4 ForeignKey not working

I can create the Contract but how do I get the contractID carried over to create the Main?
I have tried a number of different ways but I cannot seem to figure out how this should work. I have done my fair share of MVC development but always steered clear of messing with ForeignKeys 
[HttpPost]
    [ValidateAntiForgeryToken]
    public ActionResult Create(FormContext form)
    {
        if (ModelState.IsValid)
        {
            Contract hc = new Contract();
            hc.CreatedDate = DateTime.Now;
            hc.CreatedBy = "TestSubject";

            db.Contracts.Add(hc);
            db.SaveChanges();

            return RedirectToAction("CreateMain");
        }

        return View();
    }

        //
    // GET: /HostedVoiceOrder/CreateMain

    public ActionResult CreateMain()
    {

        return View();
    }

    //
    // POST: /HostedVoiceOrder/CreateMain

    [HttpPost]
    [ValidateAntiForgeryToken]
    public ActionResult CreateMain(HostedVoiceMain hostedvoicemain)
    {

        if (ModelState.IsValid)
        {
            db.HostedVoiceMains.Add(hostedvoicemain);
            db.SaveChanges();
            return RedirectToAction("Index");
        }

        return View();
    }

Here are the Models
    public class Main
{
    [Key]
    public int MainID { get; set; }
    public string MainNumber { get; set; }

    public string PortNativeExisting { get; set; }
    public string CompanyNameCallerID { get; set; }

    public string DirectoryListingName { get; set; }

    public string YPHVSIC { get; set; }

    public string VoicePortalDID {get;set;}
    public string AnywherePortalDID { get; set; }

    public string SignersName { get; set; }

    public int ContractID { get; set; }
    [ForeignKey("ContractID")]
    public virtual Contract Contract { get; set; }
}

public class Contract
{
    [Key]
    public int ContractID { get; set; }
    public DateTime CreatedDate { get; set; }
    public string CreatedBy { get; set; }        
}

A:

For example, you can pass the newly created contract's id via query string.
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create(FormContext form)
{
    if(ModelState.IsValid)
    {
        Contract hc = new Contract();
        hc.CreatedDate = DateTime.Now;
        hc.CreatedBy = "TestSubject";

        db.Contracts.Add(hc);
        db.SaveChanges();
        return RedirectToAction("CreateMain", new { contractID = hc.ContractID });
    }

    return View();
}

public ActionResult CreateMain(int contractID)
{
    return View(new Main() {
                        ContractID = contractID
                    });
}

Editor view for Main:
@using(Html.BeginForm()) {
    ...
    @Html.HiddenFor(m => m.ContractID)
    ...
}

