Bind tag vs codebehind set, best practices
<h2>I would like to know what is the best practice between using bind tag and setting direct property to a control in asp.net.</h2>

<p><hr /></p>

<p>aspx.cs</p>

<pre><code>public string Description {get; set;}
</code></pre>

<p>aspx</p>

<pre><code>&lt;asp:Literal ID="txtDescription" runat="server" Text='&lt;%# Description %&gt;' /&gt;
</code></pre>

<p><hr /></p>

<p>aspx.cs</p>

<pre><code>public string Description
{
    get { return txtDescription.Text ; }
    set { txtDescription.Text = value; }
}
</code></pre>

<p>aspx</p>

<pre><code>&lt;asp:Literal ID="txtDescription" runat="server" /&gt;
</code></pre>

<p><hr /></p>

<p>The first being best to separate design from code giving the liberty of changing even ID without breaking code. But it seems we can get very long bind tag sometime like this really short example:</p>

<pre><code>Text='&lt;%# ((fn_SearchReminders)Container.DataItem).dtDateActivation.Value.ToString("yyyy-MM-dd - hh:mm") %&gt;'
</code></pre>
