from the free dinner book for asp.net MVC
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(int id, FormCollection formValues) {
Dinner dinner = dinnerRepository.GetDinner(id);
UpdateModel(dinner);
dinnerRepository.Save();
return RedirectToAction("Details", new { id = dinner.DinnerID });
}
how to convert this line into vb.net?
return RedirectToAction("Details", new { id = dinner.DinnerID });
more the new { id = dinner.DinnerID } part
thanks
Try this
In VB the anonymous type declaration syntax, as well as normal object initializers, needs a “.” prefix on all of the property names. This is consistent with other VB features such as the With context.