<p>So I'm been pounding on this problem all day. I've got a LinqDataSource that points to my model and a GridView that consumes it. When I attempt to do an update on the GridView, it does not update the underlying data source. I thought it might have to do with the LinqDataSource, so I added a SqlDataSource and the same thing happens. The aspx is as follows (the code-behind page is empty):</p>

<pre><code>  &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
      ConnectionString="Data Source=devsql32;Initial Catalog=Steam;Persist Security Info=True;" 
      ProviderName="System.Data.SqlClient" 
      SelectCommand="SELECT [LangID], [Code], [Name] FROM [Languages]" UpdateCommand="UPDATE [Languages] SET [Code]=@Code WHERE [LangID]=@LangId"&gt;
  &lt;/asp:SqlDataSource&gt;
  &lt;asp:GridView ID="_languageGridView" runat="server" AllowPaging="True" 
      AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="LangId" 
      DataSourceID="SqlDataSource1"&gt;
      &lt;Columns&gt;
          &lt;asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /&gt;
          &lt;asp:BoundField DataField="LangId" HeaderText="Id" ReadOnly="True" /&gt;
          &lt;asp:BoundField DataField="Code" HeaderText="Code" /&gt;
          &lt;asp:BoundField DataField="Name" HeaderText="Name" /&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  &lt;asp:LinqDataSource ID="_languageDataSource" ContextTypeName="GeneseeSurvey.SteamDatabaseDataContext" runat="server" TableName="Languages" EnableInsert="True" EnableUpdate="true" EnableDelete="true"&gt;
 &lt;/asp:LinqDataSource&gt;
</code></pre>

<p>What in the world am I missing here? This problem is driving me insane.</p>

[{'answer_id': 52644, 'author': '17 of 26', 'author_id': 2284, 'author_profile': 'https://Stackoverflow.com/users/2284', 'pm_score': 0, 'selected': False, 'text': "<p>This is a total shot in the dark since I haven't used ASP at all.</p>\n\n<p>I've been just learning XAML and WPF, which appears to be very similar to what you've posted above and I know that for some UI controls you need to specify the binding mode to two-way in order to get updates in both directions.</p>\n"}, {'answer_id': 52651, 'author': 'Forgotten Semicolon', 'author_id': 1960, 'author_profile': 'https://Stackoverflow.com/users/1960', 'pm_score': 2, 'selected': False, 'text': '<p>You are missing the &lt;UpdateParameters&gt; sections of your DataSources.</p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.linqdatasource.updateparameters.aspx" rel="nofollow noreferrer">LinqDataSource.UpdateParameters</a></p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.updateparameters.aspx" rel="nofollow noreferrer">SqlDataSource.UpdateParameters</a></p>\n'}, {'answer_id': 52858, 'author': 'John Christensen', 'author_id': 1194, 'author_profile': 'https://Stackoverflow.com/users/1194', 'pm_score': 2, 'selected': True, 'text': '<p>It turns out that we had a DataBind() call in the Page_Load of the master page of the aspx file that was probably causing the state of the GridView to get tossed out on every page load.</p>\n\n<p>As a note - update parameters for a LINQ query are not required unless you want to set them some non-null default.</p>\n'}]
['https://Stackoverflow.com/questions/52634', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1194/']