Im having problems displaying records to my view when passing viewdata to a user control. This is only apparent for linq to sql objects where I am using table joins.
foreach (table1 m in (IEnumerable)ViewData.Model)
m is not of type table1. It is an anonymous type (select new { ... } in CViewDataUC.cs).
m
table1
select new { ... }
You should create a class that represents the type of the model objects you are passing from controller to view.