WebContextMenu allows you to apply the same context menu's behavior from Windows
and customize its items collection by using properties or Visual Menu Builder.
This topic will show you how to create simple WebContextMenu and attach it to a
- Drag WebContextMenu and a ASP.NET Button controls.
- Right-click on the WebContextMenu and choose Properties.
- Attach WebContextMenu to ASP.NET Button control by setting the ControlId
to Button1, which is the id of the ASP.NET
- Go to Items and click the Collection button. It will bring you
to the WebMenuItem Collection Editor box.
- You may freely customize menu commands item as you desired. Click OK to
apply the settings.
In MenuItem Types, we have 5 different types of command, such as:
- Run the Project. Right-click your mouse on the ASP.NET Button, and you will
see something like following.