title: How to open Colorbox jquery plugin modal window from asp.net code behind?
body: <p>I have an asp.net <code>listview</code> control with a <code>asp:button</code> in its <code>itemtemplate</code>. I want to open <code>Colorbox</code> when it is clicked and certain conditions satisfied (that is why I have trouble with calling onclientclick) and the Colorbox will show an iframe. 
  I tried many diffrent ways and googled alot but none of the answers were useful to me because all of them were suggesting <code>onclientclick</code> event instead on onclick.</p>
  
  <p>I'm using a code like below to open an href link in Colorbox modal dialog:</p>
  
  <pre><code>    &lt;script&gt;
                  $(document).ready(function () {
                      $(".ajax").colorbox();
                      $(".iframe").colorbox({ iframe: true, 
  width: "50%", height: "500px" });
                  });
              &lt;/script&gt;
  </code></pre>
  
  <p>But I can't make it work from code-behind inside a <code>itemcommand</code> event of an asp.net listview.</p>
  
  <p>Can you please suggest a solution?</p>