在上下文菜单控件的Popup事件中写:
if(contextMenu1.SourceControl == 控件name)
{
    构造上下文菜单代码
}

解决方案 »

  1.   

    if (contextMenu1.SourceControl.Name == 控件name)
    {
        ......
    }
      

  2.   

    每一个控件应该有与个tag值班,事件代理中加一个参数,将控件的tag值传过去
      

  3.   

    每一个控件应该有与个tag值,事件代理中加一个参数,将控件的tag值传过去(客户端接受)
      

  4.   

    在Javascript中可以写,得到tag
      

  5.   

    if (this.contextMenuName(菜单名).SourceControl==this.controlName(控件名))
    {
       menuItems[i].Click += new System.EventHandler (this.函数名()) ;
    }
    else
    {
       menuItems[i].Click += new System.EventHandler (this.另一函数名()) ;
    }