LINQ to SQL - DataContext

Discussion in 'ASP .Net' started by Scott Rymer, Jun 5, 2009.

  1. Scott Rymer

    Scott Rymer Guest

    I'm just getting started using Linq to SQL classes and I'm trying to create
    a DetailsView with a LinqDataSource on my ASP.net web form. When I try to
    configure my datasource, I don't see my DataContext in the "Choose your
    context object:" dropdown. How do I make it show up?

    Visual Web Developer 2008 Express

    -Scott
     
    Scott Rymer, Jun 5, 2009
    #1
    1. Advertising

  2. Scott Rymer

    RichB Guest

    Have you built your app, you may need to do this to show the context dd.


    "Scott Rymer" <tsrymer/at/hotmail/dot/com> wrote in message
    news:%...
    > I'm just getting started using Linq to SQL classes and I'm trying to
    > create a DetailsView with a LinqDataSource on my ASP.net web form. When I
    > try to configure my datasource, I don't see my DataContext in the "Choose
    > your context object:" dropdown. How do I make it show up?
    >
    > Visual Web Developer 2008 Express
    >
    > -Scott
     
    RichB, Jun 7, 2009
    #2
    1. Advertising

  3. Scott Rymer

    Scott Rymer Guest

    Thanks for that... it was there once I built the app. However, I'm now
    getting the following error in default.aspx.designer.vb:

    Protected WithEvents LinqDataSource1 As
    Global.System.Web.UI.WebControls.LinqDataSource
    Type 'System.Web.UI.WebControls.LinqDataSource' is not defined.

    I'm sure this means I need to add a reference somewhere but I'm not sure
    what or where...???

    -Scott


    "RichB" <> wrote in message
    news:...
    > Have you built your app, you may need to do this to show the context dd.
    >
    >
    > "Scott Rymer" <tsrymer/at/hotmail/dot/com> wrote in message
    > news:%...
    >> I'm just getting started using Linq to SQL classes and I'm trying to
    >> create a DetailsView with a LinqDataSource on my ASP.net web form. When
    >> I try to configure my datasource, I don't see my DataContext in the
    >> "Choose your context object:" dropdown. How do I make it show up?
    >>
    >> Visual Web Developer 2008 Express
    >>
    >> -Scott

    >
    >'
     
    Scott Rymer, Jun 8, 2009
    #3
  4. Scott Rymer

    Scott Rymer Guest

    Found it... I added System.Web.Extensions to my project references and it
    seems to be fine...

    Thanks Rich!

    "Scott Rymer" <tsrymer/at/hotmail/dot/com> wrote in message
    news:...
    > Thanks for that... it was there once I built the app. However, I'm now
    > getting the following error in default.aspx.designer.vb:
    >
    > Protected WithEvents LinqDataSource1 As
    > Global.System.Web.UI.WebControls.LinqDataSource
    > Type 'System.Web.UI.WebControls.LinqDataSource' is not defined.
    >
    > I'm sure this means I need to add a reference somewhere but I'm not sure
    > what or where...???
    >
    > -Scott
    >
    >
    > "RichB" <> wrote in message
    > news:...
    >> Have you built your app, you may need to do this to show the context dd.
    >>
    >>
    >> "Scott Rymer" <tsrymer/at/hotmail/dot/com> wrote in message
    >> news:%...
    >>> I'm just getting started using Linq to SQL classes and I'm trying to
    >>> create a DetailsView with a LinqDataSource on my ASP.net web form. When
    >>> I try to configure my datasource, I don't see my DataContext in the
    >>> "Choose your context object:" dropdown. How do I make it show up?
    >>>
    >>> Visual Web Developer 2008 Express
    >>>
    >>> -Scott

    >>
    >>'

    >
     
    Scott Rymer, Jun 8, 2009
    #4
    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 Gleason jr Couturier

    LINQ DataContext

    Mike Gleason jr Couturier, Oct 2, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    371
    Cowboy \(Gregory A. Beamer\)
    Oct 2, 2008
  2. Mike Gleason jr Couturier

    LINQ to SQL and new MS SQL 2008 datatypes

    Mike Gleason jr Couturier, Oct 28, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    312
    Cowboy \(Gregory A. Beamer\)
    Oct 29, 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. Andy B
    Replies:
    0
    Views:
    378
    Andy B
    Nov 28, 2008
  5. Alex. O. Koranteng

    Load type error Datacontext object

    Alex. O. Koranteng, Jun 17, 2009, in forum: ASP .Net
    Replies:
    2
    Views:
    800
    Alex. O. Koranteng
    Jun 18, 2009
Loading...

Share This Page