views:

22

answers:

0

Hello,

I have a ContentPlaceHolder with a GridView that is bound to a SqlDataSource. The ID for the SqlDataSource is as follows:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" etc...

The GridView sets the DataSourceID to SqlDataSource1 as follows:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True" DataSourceID="SqlDataSource1" etc...

Everything works fine, however, I cannot access SqlDataSource1 in my code file.

Does anyone know why I cannot get to SqlDataSource1? I can access the GridView and all the controls, just the not DataSource.

Thanks in advance for any help.