Posts

Showing posts from July, 2012

Context Menu in ASP.NET

Image
We normally face a task like to show Menu when we right click the gridview or treeview e.t.c.

Many third party controls are providing this right click context Menu to the controls like one of the best third party control like Telerik.

But we can do this type of requirements using jQuery also.

To do this in ASP.NET we need to download the jQuery Context Menu plugin.

We need frame the menu div based on our requirement.See this example to do <div>
<ulid="myMenu"class="contextMenu">
<liclass="edit"><ahref="#edit">Edit Node</a></li>
<liclass="delete"><ahref="#delete">Delete Node</a></li>
</ul>
</div>

* This source code was highlighted with Source Code Highlighter.After downloading the plugin you need to add this lines in your .aspx page

<script src="jquery.contextMenu-1.01/jquery.contextMenu.js" type="text/javascript"></script>
  <link …