Linq Query as DataSource for all controls

Discussion in 'ASP .Net' started by Scott Rymer, Sep 29, 2009.

  1. Scott Rymer

    Scott Rymer Guest

    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
    Scott Rymer, Sep 29, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ChrisN
    Replies:
    1
    Views:
    520
    Alexey Smirnov
    Aug 7, 2007
  2. George

    Linq or not Linq

    George, Nov 4, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    333
    Mike Gleason jr Couturier
    Nov 5, 2008
  3. Light
    Replies:
    0
    Views:
    812
    Light
    Oct 13, 2009
  4. Light
    Replies:
    0
    Views:
    1,463
    Light
    Oct 13, 2009
  5. John Padilla

    DropDownList Binding to LINQ DataSource

    John Padilla, Dec 15, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    196
    John Padilla
    Dec 15, 2007
Loading...

Share This Page