private void InitPreviewTemplate() { Post post = new Post() { Datetime = ASC.Core.Tenants.TenantUtil.DateTimeNow(), Title = string.Empty, Content = string.Empty, UserID = SecurityContext.CurrentAccount.ID }; ViewBlogView control = (ViewBlogView)LoadControl("~/products/community/modules/blogs/views/viewblogview.ascx"); control.IsPreview = true; control.post = post; PlaceHolderPreview.Controls.Add(new Literal() { Text = "<div class='headerPanel' style='margin-top:20px;'>" + BlogsResource.PreviewButton + "</div>" }); PlaceHolderPreview.Controls.Add(control); PlaceHolderPreview.Controls.Add(new Literal() { Text = "<div style='margin-top:10px;'><a class='baseLinkButton' href='javascript:void(0);' onclick='BlogsManager.HidePreview(); return false;'>" + BlogsResource.HideButton + "</a></div>" }); }
private void InitPreviewTemplate(Post post) { ViewBlogView control = (ViewBlogView)LoadControl("~/Products/Community/Modules/Blogs/Views/ViewBlogView.ascx"); control.IsPreview = true; control.post = post; PlaceHolderPreview.Controls.Add(new Literal() { Text = "<div class='headerPanel' style='margin-top:20px;'>" + ASC.Blogs.Core.Resources.BlogsResource.PreviewButton + "</div>" }); PlaceHolderPreview.Controls.Add(control); PlaceHolderPreview.Controls.Add(new Literal() { Text = "<div style='margin-top:10px;'><a class='baseLinkButton' href='javascript:void(0);' onclick='BlogsManager.HidePreview(); return false;'>" + ASC.Blogs.Core.Resources.BlogsResource.HideButton + "</a></div>" }); }