How to set dynamically Enabled='<%=Exceeds2dCatalogCount()?false:true%>' in asp.net?
<p>I want to set properties <code>Enabled='&lt;%=Exceeds2dCatalogCount()?false:true%&gt;'</code> to my asp.net button. but It gives me an error </p>

<blockquote>
  <p>Cannot create an object of type 'System.Boolean' from its string
  representation '&lt;%=Exceeds2dCatalogCount()?false:true%>' for the
  'Enabled' property.</p>
</blockquote>

<p>Is there any solution for this?</p>
