asp.net gridview jquery contextmenu
<p>I'm trying to display a context menu for each row in the gridview.</p>

<p>The context menu needs to pass specific variables for each row, for example, a unique userid.</p>

<p>I would like the ul to only be on the page once I have passed variables or something</p>

<pre><code>&lt;ul id="myMenu" class="contextMenu"&gt;
</code></pre>

<p></p>

<pre><code>&lt;script src="scripts/jquery-1.3.2.js" type="text/javascript"&gt;&lt;/script&gt;            
&lt;script src="scripts/jquery.contextMenu.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;link href="jquery.contextMenu.css" rel="stylesheet" type="text/css" /&gt;
    &lt;script type="text/javascript"&gt;

      $(document).ready( function() {

            // Show menu when #myDiv is clicked
            $("img").contextMenu({
                  menu: 'myMenu'
            },
                  function(action, el, pos) {
                  alert(
                        'Action: ' + action + '\n\n' +
                        'Element ID: ' + $(el).attr('id') + '\n\n' +
                        'X: ' + pos.x + '  Y: ' + pos.y + ' (relative to element)\n\n' +
                        'X: ' + pos.docX + '  Y: ' + pos.docY+ ' (relative to document)'
                        );
            });            


      });
&lt;/script&gt;


&lt;form id="form1" runat="server"&gt;
&lt;div&gt;
              &lt;asp:GridView ID="Gridview1" runat="server" AutoGenerateColumns="false"&gt;
                  &lt;Columns&gt;
                      &lt;asp:TemplateField&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Image ID="imgPop" runat="server" ImageUrl="~/images/pop.gif" /&gt;  
                          &lt;/ItemTemplate&gt;
                      &lt;/asp:TemplateField&gt;
                      &lt;asp:BoundField HeaderText="First Name" DataField ="FirstName" /&gt;
                      &lt;asp:BoundField HeaderText="Last Name" DataField ="LastName" /&gt;
                  &lt;/Columns&gt;
              &lt;/asp:GridView&gt;                                    
        &lt;ul id="myMenu" class="contextMenu"&gt;
              &lt;li class="edit"&gt;&lt;a href="#edit"&gt;Edit&lt;/a&gt;&lt;/li&gt;
              &lt;li class="cut separator"&gt;&lt;a href="#cut"&gt;Cut&lt;/a&gt;&lt;/li&gt;
              &lt;li class="copy"&gt;&lt;a href="#copy"&gt;Copy&lt;/a&gt;&lt;/li&gt;
              &lt;li class="paste"&gt;&lt;a href="#paste"&gt;Paste&lt;/a&gt;&lt;/li&gt;
              &lt;li class="delete"&gt;&lt;a href="#delete"&gt;Delete&lt;/a&gt;&lt;/li&gt;
              &lt;li class="quit separator"&gt;&lt;a href="#quit"&gt;Quit&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;    
&lt;/div&gt;
</code></pre>
