ObjectDataSource and Linq

Discussion in 'ASP .Net' started by shapper, Feb 20, 2008.

  1. shapper

    shapper Guest

    Hello,

    I am using LINQ in a ObjectDataSource to feed a ListView:

    ' odsTags_Selecting
    Private Sub odsTags_Selecting(ByVal sender As Object, ByVal e As
    ObjectDataSourceSelectingEventArgs) Handles odsTags.Selecting

    ' Create database
    Dim database As New CodeDataContext

    ' Select tags
    Dim tags = From t In database.Tags _
    Select t.TagID, _
    t.Text, _
    Active = t.FilesTags.Any Or t.ArticlesTags.Any

    End Sub ' odsTags_Selecting

    How can now use the records retrieved?

    Thanks,

    Miguel
     
    shapper, Feb 20, 2008
    #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. Mike N.
    Replies:
    0
    Views:
    502
    Mike N.
    Jul 31, 2008
  2. Mike N.
    Replies:
    0
    Views:
    643
    Mike N.
    Jul 31, 2008
  3. George

    Linq or not Linq

    George, Nov 4, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    361
    Mike Gleason jr Couturier
    Nov 5, 2008
  4. David Thielen

    ObjectDataSource method as another ObjectDataSource

    David Thielen, Mar 21, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    246
    Steven Cheng[MSFT]
    Mar 23, 2006
  5. Replies:
    0
    Views:
    215
Loading...

Share This Page