Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Login control without a Username

Is it possible to use the standard ASP.NET login control, but just ask the user for a password? I am using a template, but the runtime complains that;

Login1: LayoutTemplate does not contain an IEditableTextControl with ID UserName for the username.

My current thinking, is to add the control with style="display:none;" which seems lame. The existing project already uses FormsAuthentication, so plan B might be to roll my own Authentication method.

Update
I have a 2 step login process. Step 1: "Who are you?" and Step 2: "What is your password?"

like image 501
Dead account Avatar asked Dec 29 '22 22:12

Dead account


2 Answers

I'd sure style it with display:none long before rolling my own.

like image 114
Jeffrey Avatar answered Jan 08 '23 18:01

Jeffrey


What functionality do you want from the Login Control? I assume your rolling your own authentication mechanism? Are you really going to gain a lot by reusing the login control? If so set the style to display:none.

Edit

If you identify the user on a previous page why not show a disabled textbox with the username or part of the username in it? I've seen some banks do this where on the first page you put the login and maybee the state you live in, then it validates that, then shows you the first three characters of the login name, and your site key and asks for your password.

like image 39
JoshBerke Avatar answered Jan 08 '23 18:01

JoshBerke