Access login control fields
Hello, I want to check on the login screen if a user has been locked out. I cant use the LoginName to check as the user is not logged in. So I want to access the user name text box.
In the login control I use the layout tempate to hold a textbox with ID = UserName.
In Page_Load, I'm using this:
MembershipUser user = Membership.GetUser(UserName.Text);
Then I can check if user.IsLockedOut.ToString() is True or False.
But the C# code-behind will not recognise the UserName text box.
What am I doing wrong?
Thanks.
|