I need to pass a view data(integer) to another controller.
This is what i tried;
@Html.ActionLink("Get Location", "Index", "Map", new { Id=@item.Id},null)
i need to pass this information to "Map" Controller's Index action method;
public ActionResult Index(int? i)
{
var Id = from o in db.Objects where o.Id == i select o;
return View(Id);
}
but the parameter doesn't get pass...is this the way to pass the parameter??When i put a break point i found that int? i is null..why is that??