0
I took a project in aspx to keep and got this on aspx page
<asp:Panel ID="painelTeste" runat="server">
and in code Behind gives error
The name painTeste does not exist in the current context.
What should I do?
Edit1
my context in code Behind.
if (DateTime.Now < dataFaturamento)
{
painelTeste .Visible = false;
}
else
{
painelTeste .Visible = true;
}
You can post the snippet of the Behind code where it gives the error?
– Pedro Gaspar
If I do that, the mistake goes away:
Panel painelTeste = this.FindControl("painelTeste") as Panel;
– pnet