Questions tagged [linqdatasource]

LinqDataSource is a Web Control which enables the use of Language-Integrated Query (LINQ) in an ASP.NET Web page through markup text to retrieve and modify data from a data object.

LinqDataSource is a Web Control which enables the use of Language-Integrated Query (LINQ) in an ASP.NET Web page through markup text to retrieve and modify data from a data object.

141 questions
8
votes
2 answers

ASP.NET Dynamic Data Add Additional Filter Criteria to Page

How should I be adding additional search/filter criteria to a Dynamic Data Web Application? I created a Dynamic Data Web Application using the Northwind database and I am using a custom page for the Employees table (based on the ListDetails.aspx…
Aaron Hoffman
  • 6,604
  • 8
  • 56
  • 61
6
votes
3 answers

LinqDataSource does not support the Select property when the Delete, Insert or Update operations are enabled

I am getting this error when clicking the Delete button / link in a GridView control. LinqDataSource [DataSource] does not support the Select property when the Delete, Insert or Update operations are enabled I don't really understand why I'm…
Hewie
  • 225
  • 2
  • 8
5
votes
2 answers

LinqDataSource DataContext Object Not Showing In Configure Data Source

I added a LinqToSQL Class to my project and put it in my App_code folder. I then added a LinqDataSource to a new web page and tried to configure it to use this class, but it does not show up as an option in the DataContext drop down. I moved the…
Tracy
  • 51
  • 1
  • 3
4
votes
1 answer

ContextTextType and TableName for LinqDataSource when data source is List

I have a LinqDataSource defined like this: In LinqDataSource_FileSelecting, it returns/sets a List to e.Result, where e…
Ben Amada
  • 706
  • 11
  • 22
4
votes
4 answers

Better way of refreshing DataGridView.DataSource

Currently I have a DataGridView in my app which I fill from my Linq-to-SQL classes like so ... /// /// Delegate to update datagrid, fixes threading issue /// private void updateInfo() { // Linq to…
Emil Davtyan
  • 13,808
  • 5
  • 44
  • 66
4
votes
3 answers

LINQ Outer Joins Dynamic OrderBy

In a Linq Statement like the following (narrowed down to relevant parts for the question): var sites = from s in DataContext.Sites join add in DataContext.Address on s.PrimaryAddress equals add into sa from a in…
Nick Craver
  • 623,446
  • 136
  • 1,297
  • 1,155
3
votes
4 answers

exception when I tried to update my gridview in asp.net

when I tried to update my gridview which is connected using and Enabling update and delete in this data Source I got an exception told me that : javaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException:…
kartal
  • 17,436
  • 34
  • 100
  • 145
3
votes
2 answers

Need a good example of LinqDataSource in code, not markup

Anyone have a good example of setting up a LinqDataSource entirely in code? I don't need help writing the LINQ query. I just need help setting up the flow of the code. The reason I want to do it in code is because the complexity of the query I…
Brian David Berman
  • 7,514
  • 26
  • 77
  • 144
3
votes
2 answers

Using Linqdatasource and groupby property

I have a Linqdatasource that groups the records in table:Routing by a field called SubmitTo. My select statement is this - "new (key as SubmitTo, Count() as Count, it as Routings)". Now the SubmitTo field is only a foreign key reference the primary…
Bill
3
votes
4 answers

Can I get the T-SQL query generated from a LinqDataSource?

I´m using the LinqDataSource to populate a grid. But now I need the SQL query that the LinqDataSource generates, to pass around throught methods (no, I can't modify the methods to not need a SQL query). Is there a way to obtain the generated SQL…
Seiti
  • 2,138
  • 2
  • 21
  • 33
3
votes
1 answer

LINQDataSource - Query Multiple Tables?

I have a database and I've created a DBML Linq-to-SQL file to represent this database. I've created a new aspx page and dropped a linqdatasource and a formview control onto it. When I configure the linqdatasource it gives me the choice only to…
Dave Mackey
  • 4,306
  • 21
  • 78
  • 136
3
votes
1 answer

How can I prevent the LinqDataSource Where clause from resetting on postback?

I'm trying to set the where clause on a LinqDataSource object bound to a GridView programmatically on a button click, but when the GridView rebinds data (for instance, when the user sorts) the Where clause resets back to the empty string. Is there…
pschorf
  • 519
  • 1
  • 10
  • 23
3
votes
4 answers

Filter FormView by Query String

I have a FormView wired up to a LinqDataSource that I'd like to filter by query string. Basically, if an ID is passed in through the query string, I'd like to only show that record, otherwise if no ID is supplied just show them all. I have managed…
Hoff
  • 1,762
  • 14
  • 27
3
votes
2 answers

LinqDataSource throws System.Data.Linq.Mapping.DataAttribute is not defined error

I am using an ASP.net Website project in VB.net and have added a LINQ to SQL data class to it in order to use a number of LinqDataSource controls. Yesterday my project worked fine but after shutting down last night and starting up this morning I…
rf_wilson
  • 1,562
  • 5
  • 32
  • 44
2
votes
3 answers

LINQ: How to rewrite WHERE clause to avoid: Local sequence cannot be used in LINQ to SQL

My Linq query gives the error: Local sequence cannot be used in LINQ to SQL implementations of query operators except the Contains operator var query = from product in dc.catalog where TextBox1.Text.Split(' ').All(s =>…
user776676
  • 4,265
  • 13
  • 58
  • 77
1
2 3
9 10