title: Setting DataValueField and DataTextField shows error
body: <p>I want to populate _PropSubtype which is a dropdown list by selecting a value from the another dropdown list which is _PropType, by looking at the query you will understad. The problem which is arising is that how do i set the DataValueField and DataTextField(<strong>text to display in the dropdown list</strong>). so far the code which i have tried is:</p>
  <pre><code>protected void _PropType_SelectedIndexChanged(object sender, EventArgs e)
      {
        using (Property_dbDataContext context = new Property_dbDataContext())
          {
              var type = (from a in context.Property_subtypes
                          where a.main_type == _PropType.SelectedItem.ToString()
                          select new
                          {   
                              a.sr_no,
                              a.prop_subtype
  
                          }
          ).Distinct().ToList();
              
              _PropSubtype.DataSource = type;
              _PropSubtype.DataValueField = type[0].sr_no.ToString();
              _PropSubtype.DataTextField = type[1].prop_subtype.ToString();            
              _PropSubtype.DataBind();         
          }
  }
  </code></pre>
  <p>Now i have a save button which saves the Selected value of both the dropdown lists, but again problem with _PropSubtype, it may store the text but not the value as the valuefield is sr_no. here is the code for it:</p>
  <pre><code>protected void save_Click1(object sender, EventArgs e)
      {
          using (Property_dbDataContext context = new Property_dbDataContext())
          {
              Property basic = new Property();
              basic.property_type = _PropType.SelectedValue;
              basic.property_subtype = _PropSubtype.SelectedIndex.ToString();
              basic.property_subtype = _PropSubtype.SelectedValue;
  
              context.Property.InsertOnSubmit(basic);
              context.SubmitChanges();
          }
      }
  </code></pre>
  <p>the error which ott return after selecting an option from _PropType:</p>
  <blockquote>
  <p><em><strong>DataBinding:</strong> '&lt;&gt;f__AnonymousType0`2[[System.Int32, mscorlib,
  Version=4.0.0.0, Culture=neutral,
  PublicKeyToken=b77a5c561934e089],[System.String, mscorlib,
  Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'
  does not contain a property with the name 'Industrial Land'.</em></p>
  <p><strong>Description:</strong> An unhandled exception occurred during the execution of
  the current web request. Please review the stack trace for more
  information about the error and where it originated in the code.</p>
  <p><strong>Exception Details:</strong> System.Web.HttpException: DataBinding:
  '&lt;&gt;f__AnonymousType0`2[[System.Int32, mscorlib, Version=4.0.0.0,
  Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String,
  mscorlib, Version=4.0.0.0, Culture=neutral,
  PublicKeyToken=b77a5c561934e089]]' does not contain a property with
  the name 'Industrial Land'.</p>
  </blockquote>