The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Login Control in ASP.NET 3.5 using VB.NET
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

meir rotfleischPosted Aug 6, 2011, 2:58 PM
Hi Loved the article and the code. One small issue I'd like if you could explain in more detail how to test that the user got to the webpage only after a successful login?? Regards Meir
abraham assefaPosted Aug 3, 2010, 12:40 PM
I really thank you . It has beeb helping me much. Thanx once again
Fabrizio QuaratoPosted Jun 3, 2010, 1:11 PM
Ciao sono un developer italiano e sono alle prime armi con il login control. Come posso attivare la funzione "focus" sulla textbox "UserName" sull'evento Page_Load? Facendo Login1.UserName.Focus() genera errore. Come dovrei impostarlo??
Ray ColinPosted Mar 24, 2010, 5:12 PM
I require to have a login form on my guestbbook.aspx page, to open the guestbook enter form. I have inserted asp.login. I have studied Raj's code, but can't seem to find where to store the Username and Password. Help would be appreciated Ray
Ferry HarlimPosted Mar 23, 2010, 6:45 AM
ok
emmie evansPosted Feb 10, 2010, 4:43 PM
This is exactly what I needed, thanks! Great article and the sample code is a perfect starting point for a novice like me.
Mutia PrabandarieditedPosted Jan 21, 2010, 10:39 PMEdited Jan 21, 2010, 10:43 PM
hi,, i can log in successfully, but i have to attach the database "Vendor" in folder "Data" under SQL Server 2005 n modify the uid n password. But i realize that your program is only able to verify 1 row in the database (which is UserName "raj" and Password "raj" that in the first row). When I add another row(eg. UserName "name", Password "pw") and after that i try to reLogin using the second row besides "raj", the system will say that i put the wrong username n password. Can u provide the solution so that the system read all data in the table, not only the first row? Thank you
Moreshwar JoglekarPosted Nov 15, 2009, 8:35 AM
Installed VS 2010 Professional beta 2. The Site Master page has already a login control. Would like to know how to write the class and using Sql 2008 to create append edit update delete data regarding username password mailAddress and more some fields
ahmad affandiPosted Oct 16, 2009, 10:03 PM
sir, i found this error sqlConnection.Open() could u help me, why this happen??? maybe there are step by step for manage the database.... what do u think about this? thanks before
Bonu karunkumarPosted Jul 11, 2009, 5:23 AM
sir can you expalin the usage of login controls like forget password , recovery passwor and new user sign up
ashish sharmaPosted Jun 30, 2009, 1:16 AM
thanks for your programming concept
Naive CoderPosted May 12, 2009, 4:02 AM
Hi there. I have a question. Previously, in Visual Studio 2005, login control had template editing; such as "logged in" template, "anonymous" template, etc. These were available through the smart tag. What happened to those?!
UrielzPosted Nov 24, 2008, 6:28 AM
Hello, fateemah: This error happens because surely you have a LOGIN control within a LOGINVIEW control. I have had the same error. I solved this by seeking LOGIN control within the LOGINVIEW control. Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As AuthenticateEventArgs) Dim objLogin As System.Web.UI.WebControls.Login = CType(LoginView1.FindControl("Login1"), System.Web.UI.WebControls.Login) If YourValidationFunction(objLogin.UserName, objLogin.Password) Then e.Authenticated = True objLogin.Visible = False MessageLabel.Text = "Successfully Logged In" Else e.Authenticated = False End If End Sub I hope you will help
fateemahPosted Oct 23, 2008, 4:06 PM
Hello, I have been trying to implement the above code but have been met with quite a few problems Firstly, the Imports are not accepted and secondly, i keep on getting the error message " reference to a non shared reference requires an object reference" for "Login1" which is underlined in blue in this part of the code:- Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As AuthenticateEventArgs) If YourValidationFunction(Login1.UserName, Login1.Password) Then ' e.Authenticated = true; Login1.Visible = False MessageLabel.Text = "Successfully Logged In" Else e.Authenticated = False End If End Sub Please help me if possible...I am pretty stuck with this problem and really need help thanks