Free! ASP.NET Cookie Login
The article teaches you how to create a user login using the Dreamweaver MX ASP.NET/VB or C# server models. It also shows you how to protect a page and logout a user.
I don't think there is any article online that shows users how to create a login using the ASP.NET server model so enjoy and spread the word!!
This article was originally published on DMXFire.com and is copyright Omar Elbaga, reproduced with kind permission.
Note
The code above checks to see first if the cookie ckusername exists. If it does not, it redirects
page back to the previous page. We do this, because if this page is accessed
by accident when a user is not logged in, it will throw an error, because it's
trying to delete a cookie that doesn't exist. Anyway, after checking for that,
the code deletes the cookie ckusername and redirects to the previous page.
You're done!
By: Omar Elbaga (www.dmxfire.com )
Starting out as a fine artist, Omar Elbaga gradually moved to computer graphic arts. He was particularly amazed by the power of the World Wide Web, so he embarked upon building small-scale sites for fun utilizing HTML and his Art background. Falling in love with designing web pages and its potential, he began a career in web design. Omar has since been in the web development field for several years. With his head in computer books nearly 24 hours a day, Omar moved on to enhance his skills from web design to web programming.
Most of his work involves building database-driven web sites for small companies. Omar is currently running a popular Dreamweaver MX resource site named dmxfire.com
See All Postings From Omar Elbaga >>
Reviews
Article doesn't use .NET's Forms Authentication
Dear readers,
Realize that this article doesn't use forms authentication, which would allow you to have the "web.config" secure pages automatically. The article can be tailored fairly easily to include this though. Check back here or at www.dmxfire.com for an updated version of the article using Forms Authentication in the near future. Happy Coding!
--
Omar
dmxfire.com
almost got it
I follwed this very easily and made it through the end, but for some reason when I went to preview the page, my browser wanted to download the .aspx page instead of display it, any thoughts?
Asp.net Cookie login
Witch is better to use: Forms authtentication or this script?
I'm using Dreamweaver mx to make my aspx pages.
Asp.net Cookie login adding to prewious
I use also a sql server to store all user data, and I want to use role based login. Should I edit this script so that can validate user and roles. or where can I find examples to do role based login that use sql tabel and web.config forms authentication
You must me logged in to write a review.