protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //this connection instance is for showing data

                Dbconnection db     = new Dbconnection();
                bool         valid  = true;
                string       pageid = Request.QueryString["pageid"];
                Debug.WriteLine("PageID:" + pageid);
                if (String.IsNullOrEmpty(pageid))
                {
                    valid = false;
                }

                //We will attempt to get the record we need
                if (valid)
                {
                    HttpPage page_record = db.FindHttpPage(Int32.Parse(pageid));

                    pagetitle.Text   = page_record.GetPageTitle();
                    pagecontent.Text = page_record.GetPageContent();
                    pageauthor.Text  = page_record.GetPageAuthor();
                }
            }
        }
        public void ShowPageInfo(Dbconnection db)
        {
            bool   valid  = true;
            string pageid = Request.QueryString["pageid"];

            if (String.IsNullOrEmpty(pageid))
            {
                valid = false;
            }
            if (valid)
            {
                //finding  the page we requested by refering the function FindHttpPage in Dbconnection.cs and gets the records to display on html page
                HttpPage page_record = db.FindHttpPage(Int32.Parse(pageid));
                heading.InnerHtml     = page_record.GetPageTitle();
                pagecontent.InnerHtml = page_record.GetPageContent();
                author.InnerHtml      = "Author:" + " " + page_record.GetPageAuthor();
                Publishdate.InnerHtml = "Published on" + " " + page_record.GetPagePublish_Date();
            }
            else
            {
                valid = false;
            }
        }