title: Using a FormView with LINQ
body: <p>I am using a FormView control to edit a record fetched using a LinqDataSource. In essence, the markup for the FormView and the data source looks like this:</p>
  
  <pre><code>&lt;asp:FormView ID="RuleInstancePropertiesFormView" runat="server" DataKeyNames="RuleInstanceId"
  DataSourceID="RuleInstanceDataSource" DefaultMode="Edit" Visible="false"
  CssClass="PropertiesTable"&gt;
  &lt;EditItemTemplate&gt;
      &lt;asp:Label ID="RuleInstanceId" runat="server" Text='&lt;%# Eval("RuleInstanceId") %&gt;' /&gt;
  
      &lt;telerik:RadTextBox ID="RuleInstanceNameTextBox" 
                          runat="server"
                          Text='&lt;%# Bind("Rule.Name") %&gt;' /&gt;
  
      &lt;telerik:RadTextBox ID="LimitIndexTextBox"
                          runat="server"
                          Text='&lt;%# Bind("LimitIndex") %&gt;' /&gt;
  &lt;/EditItemTemplate&gt;
  &lt;/asp:FormView&gt;
  &lt;asp:LinqDataSource ID="RuleInstanceDataSource" runat="server"
      ContextTypeName="Questionnaire.QuestionnairesDataContext"
      TableName="RuleInstances" EnableUpdate="true"&gt;
  &lt;/asp:LinqDataSource&gt;
  </code></pre>
  
  <p>The record I am editing has a foreign key reference to another table, namely the "Rule" table. In the FormView, I need to edit fields in this foreign key table (I have a binding to the Rule.Name field in the above code).</p>
  
  <p>When I try to save my changes, the local field (LimitIndex) is saved correctly in the database, but the foreign field (Rule.Name) isn't. I'm a bit puzzled by this, as the FormView correctly fetches the current value of Rule.Name, but refuses to persist it back to the LINQ object.</p>
  
  <p>I hope anyone can help, thanks :)</p>