protected void ShowPostInfo(PagesConfig controller) { bool valid = true; string pageid = Request.QueryString["page_id"]; if (String.IsNullOrEmpty(pageid)) { valid = false; } if (valid) { Webpages page_content = controller.FindPage(Int32.Parse(pageid)); posttitle.InnerHtml = page_content.GetTitle(); postbody.InnerHtml = page_content.GetBody(); } else { valid = false; } if (!valid) { post.InnerHtml = "There was an error finding that post."; } }
protected void ShowPostInfo(PagesConfig controller) { bool valid = true; string pageid = Request.QueryString["pageid"]; if (String.IsNullOrEmpty(pageid)) { valid = false; } if (valid) { Webpages new_page = controller.FindPage(Int32.Parse(pageid)); posttitle.InnerHtml = new_page.GetTitle(); post_title.Text = new_page.GetTitle(); post_body.Text = new_page.GetBody(); if (!valid) { post.InnerHtml = "Sorry! There was an error finding that post."; } } }