Beispiel #1
0
        protected void Delete_Page(object sender, EventArgs e)
        {
            CMSDB db = new CMSDB();
            //Getting the pageid from the Request object.
            string pageid = Request.QueryString["pageid"];

            //If pageid is not empty perform the delete query and go to ListPages.aspx
            if (!String.IsNullOrEmpty(pageid))
            {
                db.DeletePage(Int32.Parse(pageid));
                Response.Redirect("ListPages.aspx");
            }
        }
Beispiel #2
0
        protected void Delete_Page(object sender, EventArgs e)
        {
            //Creating an object for the CMSDB file to execute its functions.
            CMSDB db = new CMSDB();

            //Getting the pageId from the HTTPRequest object.
            string pageid = Request.QueryString["pageid"];

            if (!String.IsNullOrEmpty(pageid))
            {
                //Calling the function to delete the record with the specified pageid
                db.DeletePage(Int32.Parse(pageid));
                //Redirecting back to ListPages.aspx
                Response.Redirect("ListPages.aspx");
            }
        }