I managed to pull listitems that I wanted to using the following
public ActionResult Index()
{
ViewData["Message"] = "Welcome to ASP.NET MVC!";
List<string> documentTitles = new List<string>();
using (ClientContext context = new ClientContext("http://siteurl"))
{
List list = context.Web.Lists.GetByTitle("doctest");
context.Load(list);
CamlQuery query = new CamlQuery();
query.ViewXml = "<View/>";
ListItemCollection listItems = list.GetItems(query);
context.Load(list);
context.Load(listItems);
//context.Load(listItems ,items => items.Include(
// item=>item["FileLeafRef"]
// ));
context.ExecuteQuery();
foreach (ListItem item in listItems )
{
documentTitles.Add(item["FileLeafRef"].ToString());
}
}
return View(documentTitles);
}
FileLeafRef is the internal name for the "Name" column.
I commented out the include FileLeafRef since it is included by default but you may need it for other columns.
Also this needs to be done in .NET 3.5 since you are using the client libraries.
You will need to populate an object with the data you want and pass that to the view (If you are not aware of this you should look at some mvc examples. From your example I can't tell if you know mvc or not or if you are just posting code to demonstrate the SharePoint issue)
You may also have to set the context crentials
context.Credentials = new NetworkCredentials("Username", "Password", "Domain");
before calling execute.