B
bryanp10
So here's a strange one... I've got an ASP.NET page with the following
object in it:
<asp:Repeater ID="rptTest" runat=server>
<ItemTemplate>blah blah
<asp:Repater ID="rptNested" runat=server>[stuff
deleted]</asp:Repeater>
</ItemTemplate>
</asp:Repater>
In the code behind I have some code like this:
rptTest.DataSource = SomeDataTable;
rptTest.DataBind();
So, when I go to build this in Visual Studio 20005, I get the following
error:
The name 'rptTest' does not exist in the current context.
However, two things are apparent:
1) Intellisense thinks the object is just fine (it both exists and is
visible)
2) I know for a *fact* that the code is executing when I access the
page. The ASP.NET engine is compiling and executing the code without a
complaint. I have commented out the code, rebuilt (and seen the
results), and then uncommented, rebuilt, and then supposedly run the
last good build... but the code is obviously executing because I can
see the repeater data on the page.
So.... WTF?
object in it:
<asp:Repeater ID="rptTest" runat=server>
<ItemTemplate>blah blah
<asp:Repater ID="rptNested" runat=server>[stuff
deleted]</asp:Repeater>
</ItemTemplate>
</asp:Repater>
In the code behind I have some code like this:
rptTest.DataSource = SomeDataTable;
rptTest.DataBind();
So, when I go to build this in Visual Studio 20005, I get the following
error:
The name 'rptTest' does not exist in the current context.
However, two things are apparent:
1) Intellisense thinks the object is just fine (it both exists and is
visible)
2) I know for a *fact* that the code is executing when I access the
page. The ASP.NET engine is compiling and executing the code without a
complaint. I have commented out the code, rebuilt (and seen the
results), and then uncommented, rebuilt, and then supposedly run the
last good build... but the code is obviously executing because I can
see the repeater data on the page.
So.... WTF?