title: Embedded Code in attribute of asp.net controls
body: <p>I want bind the visibility of a panel to the selectedValue Or selectedIndex of a gridview, so i try this:</p>
  
  <pre><code>&lt;asp:Panel ID="pnlPic" Visible='&lt;%   gvAllQuarries.SelectedIndex  == -1 ? false:true  %&gt;' runat="server" &gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code> &lt;asp:Panel ID="pnlPic" Visible='&lt;%=   gvAllQuarries.SelectedIndex  == -1 ? false:true  %&gt;' runat="server" &gt;
  </code></pre>
  
  <p>but syntax is wrong and unknown for intelisense. how can i bind like this? is it possible?</p>