private BindPage ( System.Guid pageId ) : void | ||
pageId | System.Guid | /// The page id. /// |
Результат | void |
private void BindPage(Guid pageId)
{
var page = BlogEngine.Core.Page.GetPage(pageId);
if (page == null || !page.CanUserEdit)
{
Response.Redirect(Request.Path);
return;
}
this.txtTitle.Text = page.Title;
this.txtContent.Text = page.Content;
this.txtDescription.Text = page.Description;
this.txtKeyword.Text = page.Keywords;
this.txtSlug.Text = page.Slug;
this.cbFrontPage.Checked = page.IsFrontPage;
this.cbShowInList.Checked = page.ShowInList;
this.cbPublished.Checked = page.IsPublished;
}