asp listitem Value property
<p>Thanks SOF, here I come with another asp.net question.</p>

<p>in my asp dropdownlist control, I use appenddatabounditems feature to bound to an asp listitem </p>

<pre><code>&lt;asp:DropDownList ID="CMListDD" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataSourceID="CMListDD_ODS" &gt;
           &lt;asp:ListItem value="" Text="Select a CM"/&gt;
        &lt;/asp:DropDownList&gt; 
</code></pre>

<p>I searched MSDN, and think the .net should render this to html</p>

<pre><code>&lt;option value=""&gt;Select a Product&lt;/option&gt;
</code></pre>

<p>In my code behind, I have a objectdatasource bound to my gridview to return a table based on the selected value from my dropdownlist. I use string.IsNullOrEmpty to catch this empty value, but somehow, the function doesnt catch this empty value. </p>

<pre><code> public DataTable GetPRList(string CM)
            {

                if (string.IsNullOrEmpty(CM))
                {
                   return null;
                }
                else
    {
    // do sth
    }
}
</code></pre>

<p>The if clause does not catch the empty string, but go the else{}. Anyone has any idea why?</p>

<p>Thanks</p>
