Ejemplo n.º 1
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            int forumPostId = 0;

            int.TryParse(lblForumPostId.Text, out forumPostId);
            var forumPost = ForumManager.GetPostById(forumPostId);

            if (forumPost != null)
            {
                if (!ForumManager.IsUserAllowedToEditPost(NopContext.Current.User, forumPost))
                {
                    string loginURL = SEOHelper.GetLoginPageUrl(true);
                    Response.Redirect(loginURL);
                }

                string url = SEOHelper.GetEditForumPostUrl(forumPost.ForumPostId);
                Response.Redirect(url);
            }
        }