protected override void Render(HtmlTextWriter writer)
        {
            if (this.Page.User.Identity.IsAuthenticated) {
                writer.WriteLine(@"<div class=""EditableTagList Hidden"" id=""{0}_EditableTagList"">", this._storyID);
                UserEditableTagList userTagList = new UserEditableTagList();
                userTagList.DataBind(this._tags, this._storyID, this._username);
                userTagList.RenderControl(writer);
                writer.WriteLine("</div>");

                writer.WriteLine(@"<br /><input id=""{0}_TagInput"" type=""text"" />
                <input id=""{0}_SubmitNewTags"" type=""button"" value=""Add Tag"" onclick=""AddUserStoryTags({0});"" />",
                    this._storyID);
            } else {
                //TODO: GJ: add a login control here
                writer.WriteLine(@"<table width=""200""><tr><td>");
                LoginOrCreateAccount loginOrCreateAccount = new LoginOrCreateAccount();
                loginOrCreateAccount.RenderControl(writer);
                writer.WriteLine(@"</td></tr></table>");
            }
        }
示例#2
0
        protected override void Render(HtmlTextWriter writer)
        {
            if (this.Page.User.Identity.IsAuthenticated)
            {
                writer.WriteLine(@"<div class=""EditableTagList Hidden"" id=""{0}_EditableTagList"">", this._storyID);
                UserEditableTagList userTagList = new UserEditableTagList();
                userTagList.DataBind(this._tags, this._storyID, this._username);
                userTagList.RenderControl(writer);
                writer.WriteLine("</div>");


                writer.WriteLine(@"<br /><input id=""{0}_TagInput"" type=""text"" />
                <input id=""{0}_SubmitNewTags"" type=""button"" value=""Add Tag"" onclick=""AddUserStoryTags({0});"" />",
                                 this._storyID);
            }
            else
            {
                //TODO: GJ: add a login control here
                writer.WriteLine(@"<table width=""200""><tr><td>");
                LoginOrCreateAccount loginOrCreateAccount = new LoginOrCreateAccount();
                loginOrCreateAccount.RenderControl(writer);
                writer.WriteLine(@"</td></tr></table>");
            }
        }