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
0
votes
3 answers

Insert record with EmptyDataTemplate in asp:ListView

I have an EmptyDataTemplate in my asp:ListView which I want to use to insert a new record. I have Inserting working in the InsertItemTemplate... I thought I could copy the InsertItemTemplate into the EmptyDataTemplate, on clicking Insert this gives…
Paul Rowland
  • 8,244
  • 12
  • 55
  • 76
0
votes
1 answer

LinqDataSource Where Parameter

I have the below query on my aspx page that works:
ebcrypto
  • 610
  • 1
  • 14
  • 28
0
votes
1 answer

n-layerd application and linqdatasource

Asp.net application in a n-layered architecture (better if is a DDD architecture). In the presentation layer I have a grid (let's say telerik radgrid or standard gridview) where I need to show a list of products (product is my entity). Make sense…
Andrea
  • 803
  • 1
  • 12
  • 27
0
votes
1 answer

Redirect on invalid QueryStringParameter to LinqDataSource

I have the following LinqDataSource:
Björn Lindqvist
  • 19,221
  • 20
  • 87
  • 122
0
votes
1 answer

Where parameters in LinqDataSource

I have 2 tables: carType: == id CarTypeTitle and Items == id ItemTitle CarTypeId1 CarTypeId2 CarTypeId3 as you can see, i made relationship between CarTypeId (from Items table) to id (CarType Table), and relatshionship between CarTypeId2 (from…
Oshrib
  • 1,789
  • 12
  • 40
  • 67
0
votes
1 answer

Using LinqDataSource with linq to sharepoint for paging

I am developing a a Sharepoint 2010 visual webpart and I am trying to use LinqDataSource in it to handle paging and sorting in a GridView. I made my datacontext and entity objects with spmetal. and now this is my code: my mark up: <%@ Register…
0
votes
0 answers

LinqDataSource WHERE query - ASP.NET

For my project I'm using Visual Studio 2017 and SQL Server Express. The're 3 tables: 1. Table_Discount 2. Table_Discount_Organization 3. Table_Organization_Type The tables are linked by ID's. In my .aspx file the following code is present, which…
GF17
  • 1
0
votes
2 answers

Speeding up LinqDataSource

Greetings, I have a following question. Suppose where are two tables in the database: Clients( id, name, address) Orders( id, name, desc, datemodified, client_id) The second one references the first one, that is each order is…
SPIRiT_1984
  • 2,717
  • 3
  • 29
  • 46
0
votes
1 answer

LinqDataSource selecting issue

I use LinqDataSource with a Repeater control to retrieve and show data depends on DropDownList SelectedValue. my Code follows - protected void Button1_Click(object sender, EventArgs e) { Repeater1.DataBind(); } protected void…
Shai
  • 355
  • 2
  • 5
  • 18
0
votes
1 answer

ASP.NET - FormView bound to LinqDataSource shows data but won't update database (Updating event fires however)

I have a FormView bound to LinqDataSource, that is intended to allow editing of a single product's details, that is selected from a GridView. The LDS has a Where parameter set to point to the GridView control (i.e. a…
Laurence
  • 980
  • 12
  • 31
0
votes
1 answer

Can I get EnableUpdate and EnableDelete to work on an EF4 LinqDataSource?

So I started using Linq-To-Sql about 2 years ago, but my company is pushing me to switch to Entity Framework v4. Don't want to get into the L2s vs EF arguments here, please just assume that I cannot switch back to L2S. Anyway, in good ol' L2S, I'd…
Graham
  • 3,217
  • 1
  • 27
  • 29
0
votes
3 answers

Passing LinqDataSource through Session: 'DataContext accessed after Dispose.'

I´m in need to pass some results from the database around. Instead of pass a whole dataset, or a constructed sql query, I tried to pass a LinqDataSource configured object. On the source page, I configure the LinqDataSource object properties Where…
Seiti
  • 2,138
  • 2
  • 21
  • 33
0
votes
2 answers

Error message on using LinqDataSource in webforms

Coding Platform: ASP.NET 4.0 I am binding a GridView with LinqDataSource with AutoDelete functionality enabled. GridView is bound to the Products Table. I have a Products Table and a Category Table with an association on CategoryID. If I try to…
naveen
  • 53,448
  • 46
  • 161
  • 251
0
votes
2 answers

Is it possible to set LinqDataSource.OrderBy to a method's result?

I haven't used LINQ extensively but the more I use it the more I realize how powerful it can be. Using the LinqDataSource.OrderBy clause is obviously easy if you want to sort from a property on the bounded items but what if you want to sort the…
Stig Perez
  • 3,595
  • 4
  • 23
  • 36
0
votes
1 answer

How to check if LinqDataSource is empty after selecting?

I have an asp.NET application where I use a LinqDataSource control to fill a ListView control. Here's the code for my LinqDataSource control's OnSelecting command: protected void lds_Selecting(object sender, LinqDataSourceSelectEvenArgs e) { …
Barry Michael Doyle
  • 9,333
  • 30
  • 83
  • 143