0

I am looking for a good example of using the Formview for basic CRUD operations in asp.net 4.5 with model binding. I started out by binding the formview to a linq datasource but when I attempt to update an item I get an error - "The data context used by LinqDataSource 'StreetSegmentsDataSource' must extend DataContext when the Delete, Insert or Update operations are enabled." I found this from 2011 but is this still the case with 4.5? Can I get EnableUpdate and EnableDelete to work on an EF4 LinqDataSource? What is even stanger is that I can get model binding with a GridView bound to a LingDataSource just fine??? So I am thinking it isn't me datasource that is the problem. I do have the LinqDataSource configured to allow update, insert and delete.

I guess I am not familiar with EntityDataSource - can anyone point me in the right direction? As I said - Just trying to create a simple page with a formview for CRUD operations using model binding.

Community
  • 1
  • 1
  • [This might help you mate](http://weblogs.asp.net/scottgu/linq-to-sql-part-5-binding-ui-using-the-asp-linqdatasource-control) – Binny Jan 30 '15 at 12:48
  • [try this as well](http://weblogs.asp.net/scottgu/linq-to-sql-part-9-using-a-custom-linq-expression-with-the-lt-asp-linqdatasource-gt-control) – Binny Jan 30 '15 at 13:47

0 Answers0