protected void Page_Load(object sender, EventArgs e) { db = new ContentManagementEntities(); authorid = AddArticle.myid; author = db.Authors.Where(c => c.Id == authorid).FirstOrDefault(); rep = new ArticlesRepository(); repAutors = new AuthorsRepository(); repCat = new CategoriesRepository(); articleList = rep.List(); isonclick = false; if (IsPostBack) { isonclick = true; } if (isonclick) { articleListFilter = rep.FilterList(Title.Value, Request.Form["CatType"], Request.Form["Autors"], ArticleBody.Value); } else { articleListFilter = rep.List(); } catList = repCat.List(); authorList = repAutors.List(); }