Adding a Context Menu to ASP.NET Controls

Although the context menu is a common element of most desktop applications, it is still fairly uncommon in Web application names because it doesn't map well to a server-based technology like ASP.NET. To get context menu functionality, your browser needs strong DHTML support and a rich eventing model, both of which you get in Microsoft® Internet Explorer 5.0 and newer versions, as well as in Netscape 6.0 and others. However, the various browsers' object models, although nearly identical in functionality, feature different members and names, and require you to map events and objects from one model to the other.
In this column, I'll create an ASP.NET context menu that addresses the Internet Explorer object model. Along the way, I'll call out features that can work with other browsers with some modifications. The code download for this column works with ASP.NET 1.x, but can be compiled under ASP.NET 2.0 Beta 1 as well. check out this link

1 comment: