asp.net - SelectedValue Conditional Binding
<p>I like to do a conditional bind as the Bind value may be null in which case I like to default it to the appropriate value.</p>

<p>I get the following error when I run the code - </p>

<p><strong>The name 'Bind' does not exist in the current context</strong></p>

<p>Within a EditItemTemplate I have the following:</p>

<pre><code>           &lt;EditItemTemplate&gt;

             &lt;asp:DropDownList ID="ddlTimeZone" runat="server" DataSource='&lt;%# TimeZoneInfo.GetZones().Select(s =&gt; s.Id) %&gt;'
             SelectedValue='&lt;%# Eval("TimeZone") != null ? Bind("TimeZone") : "" %&gt;'&gt;

                &lt;asp:ListItem Text="" Value=""&gt;
                &lt;/asp:ListItem&gt;

             &lt;/asp:DropDownList&gt;


          &lt;/EditItemTemplate&gt;
</code></pre>
