ReadOnly="<%# Bind("ServerProp") %>" syntax error
<p>I'm trying to bind a bool from the server to the markup:</p>

<pre><code>&lt;asp:BoundField DataField="RevSharePercent" HeaderText="Revenue Share Percentage"
  SortExpression="RevSharePrecentage" ReadOnly="&lt;%=SetFieldsReadOnly%&gt;" /&gt;
</code></pre>

<p>but rendering shows the following error:</p>

<pre><code>Parser Error Message: Literal content ('&lt;asp:BoundField
DataField="RevSharePercent" HeaderText="Revenue Share Percentage"
SortExpression="RevSharePrecentage" ReadOnly="') is not allowed within a
'System.Web.UI.WebControls.DataControlFieldCollection'.

Source Error: 
Line 59:&lt;AlternatingRowStyle BackColor="#E8E8E8" /&gt; 
Line 60:    &lt;Fields&gt; 
Line 61:      &lt;asp:BoundField DataField="RevSharePercent" HeaderText="Revenue Share Percentage" 
Line 62:        SortExpression="RevSharePrecentage" ReadOnly="&lt;%# Bind("SetFieldsReadOnly") %&gt;" /&gt; 
Line 63:      &lt;asp:BoundField DataField="ScreeningPercent" HeaderText="Screening Percentage" 
                SortExpression="ScreeningPercent" ReadOnly="&lt;%# Bind("SetFieldsReadOnly") %&gt;" /&gt;
</code></pre>

<p><strong>update</strong>
Tried "&lt;%#Bind("SetFieldsReadOnly") %>"
and ReadOnly="&lt;%#Eval("SetFieldsReadOnly") %>" />
both didn't work</p>

<blockquote>
  <p>Parser Error Message: Literal content ('
  
  <p>Source Error: </p>
  
  <p>Line 59:                          Line 60:                          Line
  61:                             
  SortExpression="RevSharePrecentage"
  ReadOnly="&lt;%#Bind("SetFieldsReadOnly") %>" /> Line 63:<br>
  " /></p>
</blockquote>
