473,395 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

LinqDataSource. Please, could someone help me out?

Hello,

I want to use a LINQ Data Source with a GridView and a FormView.
The problem is that I need to use custom LINQ Queries so I used the
following:

Private Sub ldsTags_Selecting(ByVal sender As Object, ByVal e As
LinqDataSourceSelectEventArgs) Handles ldsTags.Selecting
Dim db As New DBDataContext
Dim tags = From t In db.Tags _
Select t.TagID, _
t.Tag, _
IsUsed = t.FilesTags.Any Or t.PostsTags.Any
e.Result = tags
End Sub

Now I am trying to create the Update event:

Private Sub ldsTags_Updating(ByVal sender As Object, ByVal e As
LinqDataSourceUpdateEventArgs) Handles ldsTags.Updating

Dim db As New DBDataContext

End Sub

My question is:

How can I, inside my Updating event, get the ID and the values of the
record that is being updated, for example, in the FormView so I can
use the values in my custom LINQ Query?

Thank You,
Miguel

Nov 9 '07 #1
0 1145

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: shapper | last post by:
Hello, I have a LinqDataSource connected to a GridView. I created the following deleting event: Private Sub ldsTags_Deleting(ByVal sender As Object, ByVal e As...
0
by: =?Utf-8?B?UmFzbXVz?= | last post by:
I have a simple LiveView control that databinds to a LinqDataSource that maps to a table like this: CREATE TABLE MyTable (Id int NOT NULL, Name nvarchar(50) NULL, Picture image NULL) The OR...
1
by: shapper | last post by:
Hello, How can I get the ID (primary key) of a record just inserted in a database table by a LinqDataSource? Thanks, Miguel
1
by: shapper | last post by:
Hello, I have a ListView connected to a LinqDataSource. It uses a table, named Tags, with 2 fields: TagId and Text. I need to add a column named active. For this I created a LinqDataSource...
0
by: Marius Manolea | last post by:
Hi, I have a strange problem, I don't receive any modifications from listview in edit mode (OldValues & NewValues are empty) <asp:ListView ID="lvEditPersonRoles" runat="server"...
2
by: =?Utf-8?B?UGhpbGlw?= | last post by:
I am attempting to insert a simple record with LinqDataSource from a ListView, however I always get a message saying "....LinqDataSource 'dataSource' has no values to insert. Check that the...
3
by: david | last post by:
I've bound my GridView to a LinqDataSource control, but now I want to do some work in the RowDataBound event. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { var...
5
by: =?Utf-8?B?UGhpbGlw?= | last post by:
I am using the LINQDataSource. I want to use a Parameter to for Select which is essentially a value within a code variable. I have tried using inline code for the asp:Parameter DefaultValue,...
0
by: Andy B | last post by:
I have a GridView with a LINQDataSource attached to it. My code in the aspx markup is below. I need to know why only the checkbox field for the activated column is getting updated (the...
2
by: mesut | last post by:
Hi colleagues, how can I configure a linqdatasource in code behind. I mean I would like to create the linqdatasource programmatically in the code behind rather then dropping from the toolbox. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.