I have an aspx page containing a number of asp:Repeater Controls.
Im not using the default code-behind file that is generated, ive changed this to file in a different folder.
In the code-behind, i populate the repeater controls, all was workign fine until i added another repeater control to the aspx page.
In the code-behind, the intellisense picks up this control and i can access its methods and properties to set the datasource and bind the data. However, when i go to build the project, i get an error "The name Repeater1 does not exist in the current context"
Firstly, all the other repeater controls, declared in exactly the same way, do not throw throw this error.
Secondly, yes the repeater does have a runat="server" tag.
Thirdly, It is not inside any other controls.
I have tried various different methods of accessing this repater instead of just "Repeater1." but each returns null:
Repeater r1 = (Repeater)Page.FindControl("Repeater1") ;
Repeater r1 = (Repeater)Page.Master.FindControl("Repeater1");
Repeater r1 = (Repeater)Master.FindControl("Repeater1") ;
Ive no idea why this "doesnt exist in the current context" as all the other controls on this page do, even if i create a literal i get the same problem
View Complete Post