protected void btnEdit_Click(object sender, EventArgs e) { var forumTopic = this.ForumService.GetTopicById(this.TopicId); if (forumTopic != null) { if (!this.ForumService.IsUserAllowedToEditTopic(NopContext.Current.User, forumTopic)) { string loginURL = SEOHelper.GetLoginPageUrl(true); Response.Redirect(loginURL); } string editForumTopicURL = SEOHelper.GetEditForumTopicUrl(forumTopic.ForumTopicId); Response.Redirect(editForumTopicURL); } }