false compiler "errors?"

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top