我在 ASP.NET (C#) 中有一个简单的单页。我想添加登录控件,所以我只是添加了LoginView,如下所示:
<form id="form1" runat="server">
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:Login ID="Login1" runat="server">
</asp:Login>
</AnonymousTemplate>
<LoggedInTemplate>
... here I put all the page elements (buttons, grid views, etc.)
</LoggedInTemplate>
</asp:LoginView>
</form>
当我运行我的项目时,我的代码行为文件中出现编译错误:
The name xxxx does not exist in the current context
我究竟做错了什么?我是 ASP.NET 的新手,所以这可能是我犯的一些愚蠢的错误。