I have the error
"the name 'lblTest' does not exist in the current context"
which is really bugging me out.
ASPX:
<asp:Label ID="lblTest" Visible="false" runat="server" Text="blabal"></asp:Label>
I've placed it in between the content-tags.
code behind:
protected void showResend()
{
lblTest.Visible = true;
}
What I've tried:
- Checked spelling
- Checked that it's the correct namespace
- Checked that the ASPX and the code-behind pages are propperly linked
- Made sure that it's
runat="server" - Deleted the designer.cs page and re-generated it
- Cleared visual studio cache
And those are all the suggested sollutions I've found on google and SO. Any ideas?
EDIT:
<asp:Label ID="lblTest1" Visible="false" runat="server" Text="blabal"></asp:Label>
<asp:Panel ID="pnlDataList" runat="server" Visible="false" cssclass="draggable"></asp:Panel>
protected void showResend()
{
//lblTest1.Visible = true; //Doesn't work
pnlDataList.Visible = true; //works fine
}