title: ASP.NET SqlDataSource want to put <%# Bind("StateID") %> into SelectCommand but fail with a message "The server tag is not well formed."
body: <p>I wish to select the city name from tblCity Where the StateID will refer to the &lt;%# Bind(&quot;StateID&quot;) %&gt; but received with the error  &quot;The server tag is not well formed.&quot;
  Is there any missing part in my coding? Appreciate for helping. Thanks.
  Below is my code:</p>
  <pre><code>&lt;asp:SqlDataSource ID=&quot;SqlDataSource3&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:ConnectionString %&gt;&quot; SelectCommand=&quot;SELECT [CityName] FROM [tblCity] WHERE [StateID] = &quot;+ '&lt;%# Bind(&quot;StateID&quot;) %&gt;' + &quot;&quot;&gt;&lt;/asp:SqlDataSource&gt;
  </code></pre>