newbie: gridview problem, please help me!

Discussion in 'ASP .Net' started by Jeff, May 11, 2006.

  1. Jeff

    Jeff Guest

    OS: XP pro
    IDE VS .NET 2005
    ASP.NET 2.0

    When running my ASP.NET 2.0 code i get this error message:
    "The DataSourceID of 'GridView' must be the ID of a control of type
    IDataSource. A control with ID 'SqlDataSource1' could not be found"

    I've put a gridview on the asp.net page and as a data source I selected
    "Database" and when through the wizard and created a simple sql query which
    I tested to be okay before I went out of the wizard.... - I clicked on the
    "Test Query"-button and the data was shown as expected.... Now when I run
    this page I get the error above....

    I didn't set the property DataSourceID on the gridview, the wizards did
    this....

    I see the SqlDataSource1 control on the form so it exists....

    The gridview is placed in a WebPartZone, so the gridview here becomes a
    webpart.... Under this gridview I see the SqlDataSource1 as another
    webpart.....

    What am I doing wrong here?

    Please help, I need this gridview to work today....

    Jeff
     
    Jeff, May 11, 2006
    #1
    1. Advertising

  2. Jeff

    Jeff Guest

    case solved

    The problem was that the SqlDataSource was placed in a WebPartZone





    "Jeff" <> wrote in message
    news:...
    > OS: XP pro
    > IDE VS .NET 2005
    > ASP.NET 2.0
    >
    > When running my ASP.NET 2.0 code i get this error message:
    > "The DataSourceID of 'GridView' must be the ID of a control of type
    > IDataSource. A control with ID 'SqlDataSource1' could not be found"
    >
    > I've put a gridview on the asp.net page and as a data source I selected
    > "Database" and when through the wizard and created a simple sql query
    > which I tested to be okay before I went out of the wizard.... - I clicked
    > on the "Test Query"-button and the data was shown as expected.... Now when
    > I run this page I get the error above....
    >
    > I didn't set the property DataSourceID on the gridview, the wizards did
    > this....
    >
    > I see the SqlDataSource1 control on the form so it exists....
    >
    > The gridview is placed in a WebPartZone, so the gridview here becomes a
    > webpart.... Under this gridview I see the SqlDataSource1 as another
    > webpart.....
    >
    > What am I doing wrong here?
    >
    > Please help, I need this gridview to work today....
    >
    > Jeff
    >
     
    Jeff, May 11, 2006
    #2
    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. Replies:
    4
    Views:
    565
    Chris Uppal
    May 5, 2005
  2. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    18,042
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  3. KK
    Replies:
    2
    Views:
    711
    Big Brian
    Oct 14, 2003
  4. MuZZy
    Replies:
    7
    Views:
    1,825
    Mike Hewson
    Jan 7, 2005
  5. mera
    Replies:
    7
    Views:
    1,156
Loading...

Share This Page