Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Oct 23, 2008 12:43 AM|LINK
firstly, From v In dataContext.VisitAudits Select v is the same as just saying
Return View(deletedvisits) sets the Model property on the ViewData object to deletedvisits.
so it would be
For Each v As VisitAudit In ((IEnumerable<VisitAudit>) ViewData.Model
unless the page derives from ViewPage<IEnumerable<VisitAudit>>, if so you don't need the cast.
Another way to do it is
ViewData["deletedvisits"] = deletedvisits;
For Each v As VisitAudit In ((IEnumerable<VisitAudit>) ViewData.["deletedvisits"]