
| Visual Basic (Declaration) | |
|---|---|
Public Class WebContextMenu Inherits ISNet.WebUI.ISNetControl Implements ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ITemplateSync, IWebMenu, IWebMenuControl | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As WebContextMenu | |
| C# | |
|---|---|
public class WebContextMenu : ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ITemplateSync, IWebMenu, IWebMenuControl | |
WebContextMenu is designed with a professional architecture and object model as well as specialized user interface for each elements. Therefore, WebContextMenu provides a flexibility to create a Windows-like ContextMenu object which is rich in styles, functions, and behaviors.
WebContextMenu can be integrated with DesktopManager. When integrated, WebContextMenu will refer to the DesktopManager instance and use the Styles defined in DesktopManager automatically. The benefits of this integration are faster page performance with reduced output and maintain the consistency of "look & feel" in entire application effortlessly.
WebContextMenu provides you the easiest way on performing server-side controls integration. You just simply set the ControlId property to the server control's Id, and the designer will do the integration part automatically without any extensive coding required.
| C# | Copy Code |
|---|---|
protected void Page_Load(object sender, EventArgs e) { WebContextMenu wcm = new WebContextMenu(); wcm.ControlId = "Button1"; WebMenuItem wmi1 = new WebMenuItem(); wmi1.Name = "mnuContextMenu1"; wmi1.Text = "ContextMenu1"; wcm.Items.Add(wmi1); WebMenuItem wmi2 = new WebMenuItem(); wmi2.Name = "mnuContextMenu2"; wmi2.Text = "ContextMenu2"; wcm.Items.Add(wmi2); HtmlForm frm = (HtmlForm)Page.FindControl("Form1"); frm.Controls.Add(wcm); } | |
System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
ISNet.WebUI.ISNetControl
ISNet.WebUI.WebDesktop.WebContextMenu
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2