System.Web.UI.WebControls.Menu.RenderDynamicMenu C# (CSharp) Method

RenderDynamicMenu() private method

private RenderDynamicMenu ( System.Web.UI.HtmlTextWriter writer, System.Web.UI.WebControls.MenuItem item ) : void
writer System.Web.UI.HtmlTextWriter
item System.Web.UI.WebControls.MenuItem
return void
		void RenderDynamicMenu (HtmlTextWriter writer, MenuItem item)
		{
			_dynamicTemplate = GetDynamicMenuTemplate (item);

			string idPrefix = ClientID + "_" + item.Path;
			string [] param = new string [9];
			param [0] = GetCssMenuStyle (true, item.Depth + 1);
			param [1] = idPrefix + "s";
			param [2] = idPrefix + "cu";
			param [3] = item.Path;
			param [4] = item.Path;
			param [5] = ScrollUpImageUrl != "" ? ScrollUpImageUrl : Page.ClientScript.GetWebResourceUrl (typeof (Menu), "arrow_up.gif");
			param [6] = ScrollUpText;
			param [7] = idPrefix + "cb";
			param [8] = idPrefix + "cc";

			_dynamicTemplate.RenderTemplate (writer, param, 0, param.Length);

			RenderMenu (writer, item.ChildItems, true, true, item.Depth + 1, false);

			string [] param2 = new string [5];
			param2 [0] = idPrefix + "cd";
			param2 [1] = item.Path;
			param2 [2] = item.Path;
			param2 [3] = ScrollDownImageUrl != "" ? ScrollDownImageUrl : Page.ClientScript.GetWebResourceUrl (typeof (Menu), "arrow_down.gif");
			param2 [4] = ScrollDownText;

			_dynamicTemplate.RenderTemplate (writer, param2, param.Length + 1, param2.Length);

		}

Same methods

Menu::RenderDynamicMenu ( System.Web.UI.HtmlTextWriter writer, System.Web.UI.WebControls.MenuItemCollection items ) : void

Usage Example

Example #1
0
        public override void RenderEndTag(HtmlTextWriter writer)
        {
            Menu owner = Owner;

            if (owner.StaticDisplayLevels == 1 && owner.MaximumDynamicDisplayLevels > 0)
            {
                owner.RenderDynamicMenu(writer, owner.Items);
            }
        }
All Usage Examples Of System.Web.UI.WebControls.Menu::RenderDynamicMenu