Dropdown List will not populate
<p>I'm not sure how to correct the following problem. I have dropdown list that has a object data source. Then in the code there is a method like this </p>

<pre><code>void InitPageData()
{
    MembershipUser user = Membership.GetUser();
    DataSetTableAdapters.MemberInfoTableAdapter da = new DataSetTableAdapters.MemberInfoTableAdapter();
    DataSet.MemberInfoDataTable dt = da.GetMember((Guid)user.ProviderUserKey);
    if (dt.Rows.Count == 1)
    {
        DataSet.MemberInfoRow mr = dt[0];
        //rank.Text = mr.rank;
        //position.Text = mr.position;

        UserName.Text = user.UserName;
        ...
    }
</code></pre>

<p>This method populates form fields on the page. What I'm trying to do is to have the rank dropdown list populated from the ods but use this method above to populate the selected item of the rank dropwon list with the line rank.Text = mr.rank. In this example the the line of code that throws the error is commented out otherwise it throws this: "'rank' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value".</p>

<p>I've chaned the code to rank.DataTextFiled = mr.rank and rank.DataValueField = mr.rankid.ToString() but this threw another error: "DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Star'." "Star" is the value of the mr.rank.</p>

<p>Here is what the dropdown list and the ods look like:</p>

<pre><code>&lt;asp:DropDownList runat="server" ID="rank" CssClass="txtfield" DataSourceID="ODCRanks"
    DataTextField="Rank" DataValueField="ID" AppendDataBoundItems="True"&gt;
&lt;asp:ListItem Text="--- Select a Rank ---" Value="-1"   /&gt;                                            
</code></pre>

<p></p>

<pre><code>&lt;asp:ObjectDataSource ID="ODCRanks" runat="server" 
OldValuesParameterFormatString="original_{0}" SelectMethod="GetRanks" 
TypeName="RanksTableAdapters.RankTableAdapter"&gt;&lt;/asp:ObjectDataSource&gt;
</code></pre>
