In your case it would be much simpler to create a model to hold your data rather than using an anonymous type.
The issue you're having is that your anonymous type is cast to an object when its stored within the ViewData. On the UI side, when you get that object out, the only way to access its properties is to use reflection. You do NOT want to do this in your UI. It will be highly ugly. Instead, just add the following class to your Models:
public class Project{
public string Title {get;set;}
public string DevUrl {get;set;}
public string QAUrl {get;set;}
public string LiveUrl {get;set;}
public IEnumerable<User> Users {get;set;}
public static IEnumerable<Project> RetrieveAllProjects()
{
return from p in db.Projects
orderby p.title
select new Project
{
Title = p.title,
DevURL = p.devURL ?? "N/A",
QAURL = p.qaURL ?? "N/A",
LiveURL = p.liveURL ?? "N/A",
Users = p.GetUsers().MakeUserList()
};
}
In your controller do this:
public ActionResult Index()
{
return View("Index", Project.RetrieveAllProjects());
}
and in your view's codebehind, strongly type it thusly:
//snip
public partial class Index : ViewPage<IEnumerable<Project>>
{
//snip
You might think its a bit wasteful to have all these models laying around, but its much easier to understand, and makes your UI code much slimmer, if you use your models wisely.
Also, a model is a great place (and, in fact, should be where you do it) to place the logic for loading your data and constructing the models themselves. Think ActiveRecord. And, while you're coding all this, realize that projects like SubSonic create your models for you without any muss or fuss.