i have the following loginview code in my site.master design
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a href="Log.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>
the log.aspx.cs file has the following code:
protected void Page_Load(object sender, EventArgs e)
{
Master.FindControl("CAMenu").Visible = false;
}
protected void btnLogin_Click(object sender, EventArgs e)
{
if (txtUsername.Text == "admin" && txtPassword.Text == "1234")
{
Response.Redirect("NewEvent.aspx");
}
}
but the login view is not updating to Welcome “Username”.. whats the mistake here. Should i change anything??? Please help
In Login.Aspx i made the following changes..
And in Site.Master:-