Yesterday I began to write C# in order to develop usercontrols for Umbraco and I ran across a well-known problem where I get the error "The * name does not exist in the current context." I found inumerous answers to that particular problem, as:
Fixing "name does not exist in the current context" errors in Web Developer Express
Label doesnt exist in the current context
http://forums.asp.net/t/1006588.aspx/1?The+name+xxx+Does+Not+Exist+in+the+Current+Context
...and so on and so forth.
None of these questions, however, did help me solve my problem and I'm still banging my head against a wall.
I then discovered that my tags and their controls get discovered by my *.apsx.cs file, as long as I don't put them within any non-asp:-tag!
I'm trying to make a custom login control with a custom template, for that I need the -tag. Furthermore I put this within a inside an LoginView control.
<asp:LoginView ID="MemberValidation" runat="server">
<AnonymousTemplate>
<asp:Login ID="MemberLogin" runat="server" OnLoggedIn="MemberLogin_OnLoggedIn">
<LayoutTemplate>
<asp:Literal ID="InformationMessage" runat="server"></asp:Literal>
</LayoutTemplate>
</AnonymousTemplate>
<LoggedInTemplate>...</LoggedInTemplate>
</asp:LoginView>
My LiteralControl (and all the other LiteralControls I have - this is just a tiny example) is not registrered within the *.aspx.design.cs file automatically, hence, it is not accessible in my *.aspx.cs file, however if I remove the tag and the tag, my LiteralControl pops up.
However, I need the two tags to make the code function as I wish, so my question remains unsolved: What can I do? Is it a bug?
Thanks in advance, Brinck10