Monday, July 27, 2009

USER LOGIN function in VB.NET (Code Syntax?)?

Hi all, I need help here =/





I need to develop a web based application based on:


- Microsoft's ASP.NET 2.0


- SQL Server 2005


- Programming language is VB.Net








Programs I used are:


- Visual Web Developer 2005 Express Edition


- Microsoft SQL Server Management Studio








Currently I need to do the LOGIN FUNCTION for the user but im not sure how to start. I studied C# in school but my internship company (currently) required me to code in VB.Net and for that I find it very confusing.








Description of what I have:


The main page has a UserID and Password.


- 2 textboxes (and 2 Required Field Validator)


- 1 Login button


- 1 label for Login Error (A login message will be shown if user failed to log in)


- Forget Password Link








The database has a table named User:


- Fields are UserID, Password, .............








*Note* User do not have to register. There is no registration form.








I would like to know how the code syntax is like in VB.NET?





Thanks!

USER LOGIN function in VB.NET (Code Syntax?)?
IMHO, your C# background is awesome and you shouldn't use that as an excuse now. You can do it. Take heart that VB.NET and Visual C#.NET are not really worlds apart since they share the same Base Class Library. Believe it or not, it will be easier for you to learn VB.NET with your C# background than it is for most VB6 developers to transition to VB.NET!





Here's an excellent .NET developers' website that may have some clues for you: http://www.codeproject.com/info/search.a...


Having said that, most of those articles deal with complex forms authentication and role-based security, which is probably beyond what you need. You simply need to validate the user credentials against the db and then allow access (redirect, most likely) to other pages or not.





Let me ask you this: Do you have a good idea how you'd accomplish this in C#? If so, you may want to write out and post some C# pseudocode snippets and see if people can help you translate it to VB.NET. If nothing else, it will help you organize your thoughts.


No comments:

Post a Comment