Fluqi.Widget.jSelectMenu.SelectMenu.GetTagHtml C# (CSharp) Method

GetTagHtml() protected method

Builds and returns the HTML for the SelectMenu control (basically the DIV). JavaScript initialisation for the control is also added to the response stream if the AutoScript rendering option is true.
protected GetTagHtml ( ) : string
return string
		protected internal string GetTagHtml() {
			// ID property is _mandatory_
			if (string.IsNullOrEmpty(this.ID))
				throw new ArgumentException("SelectMenu ID property _must_ be supplied.");

			bool prettyRender = this.Rendering.PrettyRender;
			bool renderCss = this.Rendering.RenderCSS;
			int tabDepth = this.Rendering.TabDepth;
			jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth);

			this.WithID(this.ID);
			if (renderCss)
				// it's the top level, so output CSS (if required)
				this.WithCss("ui-selectmenu-button ui-widget ui-state-default ui-corner-top");

			this.Root.BuildTagHtml(sb);

			if (this.Rendering.AutoScript) {
				this.RenderStartUpScript();
			}

			return sb.ToString();

		} // GetTagHtml