title: Execute jQuery function from asp:DataGrid ItemCommand
body: <p>I have an <code>asp:DataGrid</code>, in this grid view an <code>asp:ButtonColumn</code>. When I click on delete action, I enter in the <code>"delete"</code> case switch. If the result is false, I'd like execute an jQuery function define in the .aspx page.</p>
  
  <p>Is it possible to do this ?</p>
  
  <pre><code>&lt;asp:DataGrid runat="server" ID="dgList" InItemCommand="dgList_ItemCommand"&gt;
      &lt;asp:ButtonColumn Text="Delete" CommandName="delete" /&gt;
  &lt;/asp:DataGrid&gt;
  </code></pre>
  
  <p>In the code behind :</p>
  
  <pre><code>protected void dgList_ItemCommand(object source, DataGridCommandEventArgs e)
  {
      switch (e.CommandName)
      {
          case "other_command":
              break;
  
          case "delete":
              bool myResult = new MyClass().GetTest();
                      //if myResult = false, I'd like execute a jquery function
              break;
      }
  
  }
  </code></pre>