public ActionResult DeleteProduct() { string productid = Request.QueryString["q"]; ProductDataContext db = new ProductDataContext(); try { if (!string.IsNullOrEmpty(productid)) { db.SP_DeleteProduct(Convert.ToInt32(productid)); } } catch (Exception ex) { throw; } return(RedirectToAction("Product")); }