protected void btnDelete_Click(object sender, EventArgs e) { ForumTopic forumTopic = ForumManager.GetTopicByID(this.TopicID); if (forumTopic != null) { if (!ForumManager.IsUserAllowedToDeleteTopic(NopContext.Current.User, forumTopic)) { string loginURL = CommonHelper.GetLoginPageURL(true); Response.Redirect(loginURL); } ForumManager.DeleteTopic(forumTopic.ForumTopicID); string forumURL = SEOHelper.GetForumURL(forumTopic.ForumID); Response.Redirect(forumURL); } }