Trying to set up the Login control as a User control, but none of the controls exist in the current context? I also tried adding to a master page with the same error showing up.
None of my code below is recognised? What’s going on here please? I’ve rebuilt the solution many times.
if (Membership.ValidateUser(this.UserName.Text, this.Password.Text))
{
FormsAuthentication.RedirectFromLoginPage(UserName.Text, RememberMe.Checked);
}
else
{
Msg.Text = "Login failed. Please check your user name and password and try again.";
}
Make sure you have used the proper namespaces and the
System.Webassembly is referenced in your project:System.Web.Securitynamespace in theSystem.WebassemblySystem.Web.Securitynamespace in theSystem.Webassembly