protected void Delete_Advice_LinkButton_Click(object sender, CommandEventArgs e) { if (Session["UserInfo"] != null) { MessageInfo myadvice = new MessageInfo(); myadvice.MessageID = int.Parse(e.CommandArgument.ToString()); myadvice.DeleteAdvice(); AllDataBind(); //Response.Redirect(Request.Url.AbsoluteUri); } }