title: Open Jquery Dialog Using asp.net Gridview Template Field
body: <p>How Can I Open Jquery Dialog with and image button that putted in Gridview Template Field?</p>
  
  <pre><code>  &lt;asp:TemplateField HeaderText="افزودن"&gt;
                                      &lt;ItemTemplate&gt;
                                          &lt;asp:ImageButton ID="add" runat="server" CausesValidation="false" CommandName="adddetail"
                                              ImageUrl="~/Tadarokat/Images/add.png" Text="افزوردن" CommandArgument='&lt;%# eval("mprid") %&gt;' /&gt;
                                      &lt;/ItemTemplate&gt;
                                      &lt;ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /&gt;
                                  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>my jquery function is : </p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
      // increase the default animation speed to exaggerate the effect
      $.fx.speeds._default = 1000;
      $(function test() {
          $('#Div2').dialog({
              autoOpen: false,
              show: 'slide',
              hide: 'clip',
              width: 'auto',
              height: 'auto'
              ,
              modal: true,
              resizable: false
          });
  
          $('#opener').click(function test() {
              $('#Div2').dialog('open');
              return false;
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>opener is an html button.
  i want to use my asp.net image button instead opener.
  Does My question Clear?</p>