Try this code:
public int RottenTomatoesId { get; set; }
public string Title { get; set; }
public int Year { get; set; }
public string MpaaRating { get; set; }
public int? Runtime { get; set; }
public string Synopsis { get; set; }
public List<ReleaseDate> ReleaseDates { get; set; }
public List<Rating> Ratings { get; set; }
public List<string> Genres { get; set; }
public List<string> Directors { get; set; }
public List<CastMember> Cast { get; set; }
public MovieLinkCollection Links { get; set; }
public PosterCollection Posters { get; set; }
@model CherryTomato.Entities.MovieSearchResults
@{
ViewBag.Title = "Movie Search";
Layout = "~/Views/Shared/_Layout.cshtml";
string title = string.Empty;
var grid = new WebGrid(@Model, canPage: true);
}
@model CherryTomato.Entities.MovieSearchResults
@{
ViewBag.Title = "Movie Search";
Layout = "~/Views/Shared/_Layout.cshtml";
string title = string.Empty;
var grid = new WebGrid(@Model, canPage: true);
}
<div id="Results">
<form action="" method="post">
<input type="text" name="q" value="" />
<input type="submit" name="btnSubmit" value="Search" />
</form>
@if (@Model != null && @Model.Count > 0)
{
@grid.GetHtml()
}