protected void Page_PreRender(object sender, EventArgs e) { if (Request["names"] == null) { DisplayErrorMessage("You must specify a names querystring parameter"); return; } var tags = new List <Tag>(); foreach (var item in Request["names"].Split(',')) { var tag = TagsMapper.GetByName(item); if ((tag != null) && (!tags.Contains(tag))) { tags.Add(tag); } } var allByTag = MediaDetailsMapper.FilterByTags(MediaDetailsMapper.GetAllActiveMediaDetails(), tags); MediaDetailsList.DataSource = allByTag; MediaDetailsList.DataBind(); }