Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Linq Query as DataSource for all controls

Reply
Thread Tools

Linq Query as DataSource for all controls

 
 
Scott Rymer
Guest
Posts: n/a
 
      09-29-2009
I've got a single page that is to give a bunch of information about a single
serial number that the user will search on:
1. Serial Details (DetailsView1)
2. Notes (FormView1)
3. Registered Owner (FormView2)
4. Component Serials (GridView1)
5. Invoice Details (GridView2)
6. Service Record (GridView3)
7. Transaction History (GridView4)

The search only requires a part of the serial number to be entered and will
return multiple objects which can be paged through:

Dim serials = From s In db.Serials _
Where s.Serial.EndsWith(txtSerial.Text) _
Select s

I've created the LINQ to SQL classes so that all the other information are
properties of the Serial object, so I can access:

serials.First.Notes (1-to-1)
serials.First.RegisteredOwner (1-to-1)
serials.First.ComponentSerials (1-to-many)
serials.First.InvoiceDetails (1-to-many)
serials.First.ServiceRecords (1-to-many)
serials.First.TxnHistory (1-to-many)

How would I go about setting a "page wide" datasource for all the controls
to bind to (or how do I bind all the controls such that a page change in 1.)
will result in all other data changing)?

-Scott

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ DataSource, Where Parameters, ASP.NET Light ASP .Net 0 10-13-2009 09:16 PM
LINQ DataSource, Where Parameters, ASP.NET Light ASP .Net 0 10-13-2009 09:14 PM
Linq or not Linq George ASP .Net 4 11-05-2008 04:53 PM
DropDownList Binding to LINQ DataSource John Padilla ASP .Net Web Controls 0 12-15-2007 07:08 PM
Please translate this C# LINQ query into VB for me !!!!! ChrisN ASP .Net 1 08-07-2007 07:29 AM



Advertisments