Sorry, we're closed.

PeterBlum.com was active from 2002 - 2013, when ASP.NET Web Forms were all the rage.

Thanks for your patronage!

Feel free to browse this preserved snapshot of the products, demos, and documentation from those days. Then hop over to github.com/plblum to see what Peter's been working on lately.

Home     About PeterBlum.com     Policies     Download a Licensed Product     Newsletter
Peter's Interactive Pages
ContextMenu Control

The Context Menu is a client side menu that looks like the same context menus users see when they right click in the browser. When the user clicks on a command, it runs a client side script that you supply.

Its features include:
  • Runs JavaScript that you supply, go to a URL that you specify, or postback. It can fire validation and offer a confirmation message prior to taking any of those actions.
  • Styled like a traditional context menu but you can control the styles
  • Can show and invoke a command's keyboard shortcut
  • Can show a separator line
  • Can show a hint row which is not selectable and uses a different style
  • Rights on left, right or both mouse buttons
  • Can be hooked up to any control or the page itself

Demo

Right click in this textbox to see a menu with three items. A command (which supports CTRL+K when focus is in the textbox), a separator, and a hint.

ASP.NET Syntax for this demo

<asp:TextBox ID="ContextMenuTextBox1" runat="server" />
<des:ContextMenu ID="ContextMenu1" runat="server">
  <ClickList>
    <des:ClickItem MouseButtonType="Right" ControlID="ContextMenuTextBox1" />
  </ClickList>
  <des:CommandMenuItem OnClickScript="alert('All commands run Javascript. In this case, it called the alert() function.');" 
      CommandLabel="Command 1" CommandID="1" CommandKey="CTRL+K" />
  <des:SeparatorMenuItem/>
  <des:HintMenuItem Hint="The above was a separator" />
</des:ContextMenu>