I figured it out, if anyone wants a hint:
It was like this:
// GET: tb_visitas/Create
public ActionResult Create()
{
ViewBag.id_broc = new SelectList(db.tb_brochuras, "id_broc", "descricao");
ViewBag.id_g = new SelectList(db.tb_despertai, "id_g", "tema");
ViewBag.id = new SelectList(db.tb_estrangeiros, "id", "nome");
ViewBag.id_fol = new SelectList(db.tb_folhetos, "id_fol", "descricao");
ViewBag.id_livros = new SelectList(db.tb_livros, "id_livros", "descricao");
ViewBag.id_wp = new SelectList(db.tb_sentinela, "id_wp", "tema");
return View();
}
So I switched to that:
// GET: tb_visitas/Create
public ActionResult Create(tb_estrangeiros estrangeiros)
{
ViewBag.id_broc = new SelectList(db.tb_brochuras, "id_broc", "descricao");
ViewBag.id_g = new SelectList(db.tb_despertai, "id_g", "tema");
ViewBag.id = new SelectList(db.tb_estrangeiros, "id", "nome", estrangeiros.id);
ViewBag.id_fol = new SelectList(db.tb_folhetos, "id_fol", "descricao");
ViewBag.id_livros = new SelectList(db.tb_livros, "id_livros", "descricao");
ViewBag.id_wp = new SelectList(db.tb_sentinela, "id_wp", "tema");
return View();
}
Put these two classes in your question !!!
– novic