protected void Page_Load(object sender, EventArgs e) { if (!String.IsNullOrEmpty(Request.QueryString["postID"])) { string postID = Request.QueryString["postId"].Replace(".xml", String.Empty); PostBroker broker = new PostBroker(); broker.DeletePostByID(postID); Response.Redirect("Default.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (!String.IsNullOrEmpty(Request.QueryString["postID"])) { URLPathUtility upu = new URLPathUtility(); string postID = Request.QueryString["postId"].Replace(".xml", String.Empty); PostBroker broker = new PostBroker(); broker.DeletePostByID(postID); Response.Redirect(upu.GetNavigableAppPath() + "Default.aspx"); } }