Pages

Thursday, August 30, 2007

ASP.NET 2008 Beta: '"SqlDataSource1";' could not be found.

When you get this error in Visual Web Developer 2008 Beta:

The DataSourceID of 'GridView1' must be the ID of a control of type IDataSource. A control with ID '"SqlDataSource1";' could not be found.

do this:

Find the Code that looks like this:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource1"; EmptyDataText="There are no data records to display." GridLines="Vertical"

...and remove the semicolon (;).

No comments:

Share This!

Contact Us

Name

Email *

Message *