public ActionResult FormBrand() { if (Session["admin"] == null) { Response.Redirect("~/Admin2/Home/Login"); } Brand brand = new Brand(); try { int id = Convert.ToInt32(Request.Params["id"]); if (id != 0) { brand = br.SelectBrand(id); } } catch { } return(View(brand)); }