Click here to Skip to main content
15,892,809 members
Articles / Web Development / ASP.NET

TwoColorsMenu - The fastest menu in the world

Rate me:
Please Sign up or sign in to vote.
4.61/5 (20 votes)
10 Dec 2007CPOL2 min read 49.7K   1.1K   87  
This article will demo the fastest way to create a menu for your web page with the TwoColorsMenu.
using System;
using OboutInc.TwoColorsMenu;

public class ex_SubmenuIcon : System.Web.UI.Page
{
	private void Page_Load(object sender, System.EventArgs e)
	{
		TwoColorsMenu tcm1 = new TwoColorsMenu();
		tcm1.ID = "tcm1";
		tcm1.StyleFolder = "styles/submenuicon";
		tcm1.SubMenuText = "";

		tcm1.Add(null, "brands", "Brands", "javascript:alert('you clicked me');void(0);", null);
			tcm1.Add("brands", "ibm", "IBM");
			tcm1.Add("brands", "microsoft", "MICROSOFT");
			tcm1.Add("brands", "obout", "OBOUT", "http://www.obout.com/", "_top");
				tcm1.Add("obout", "treeview", "TreeView", "http://www.obout.com/t2/edraganddrop.aspx", "_top");
				tcm1.Add("obout", "slidemenu", "Slide Menu", "http://www.obout.com/sm3/whatisnew.aspx", "_top");
				tcm1.Add("obout", "calendar", "Calendar", "http://www.obout.com/calendar/", "_top");
				tcm1.Add("obout", "postback", "Postback4", "http://www.obout.com/pb4/", "_top");
				tcm1.Add("obout", "splitter", "Splitter", "http://www.obout.com/splitter/", "_top");
				tcm1.Add("obout", "easymenu", "EasyMenu", "http://www.obout.com/em/", "_top");
				tcm1.Add("obout", "combobox", "Combobox", "http://www.obout.com/em/ex_combobox.aspx", "_top");
				tcm1.Add("obout", "editor", "HTML Editor", "http://www.obout.com/editor_new/", "_top");
				tcm1.Add("obout", "superbutton", "Super Button", "http://www.obout.com/osb/", "_top");
				tcm1.Add("obout", "treedb", "Tree_DB", "http://www.obout.com/t_db/index.aspx", "_top");
				tcm1.Add("obout", "twocolorsmenu", "TwoColorsMenu", "http://www.obout.com/tcm/tcm.aspx", "_top");
		tcm1.Add(null, "systems", "Systems");
			tcm1.Add("systems", "desktops", "Desktops");
			tcm1.Add("systems", "handhelds", "Handhelds");
			tcm1.Add("systems", "notebooks", "Notebooks");
			tcm1.Add("systems", "servers", "Servers");
		tcm1.Add(null, "hardware", "Hardware");
			tcm1.Add("hardware", "accessories", "Accessories");
			tcm1.Add("hardware", "keyboards", "Keyboards");
			tcm1.Add("hardware", "memory", "Memory");
			tcm1.Add("hardware", "printers", "Printers");
			tcm1.Add("hardware", "videocards", "Video Cards");
		tcm1.Add(null, "software", "Software");
			tcm1.Add("software", "applications", "Applications");
			tcm1.Add("software", "licensing", "Licensing");

		Page.Controls.Add(tcm1);
	}

	#region Web Form Designer generated code
	override protected void OnInit(EventArgs e)
	{
		//
		// CODEGEN: This call is required by the ASP.NET Web Form Designer.
		//
		InitializeComponent();
		base.OnInit(e);
	}
	
	/// <summary>
	/// Required method for Designer support - do not modify
	/// the contents of this method with the code editor.
	/// </summary>
	private void InitializeComponent()
	{    
		this.Load += new System.EventHandler(this.Page_Load);

	}
	#endregion
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Unknown
I am Ned Thompson, 26 years old. I am working at obout inc as web component developer. I am really good at ASP.NET and Javascript.


Comments and Discussions