Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

How can I use forms authentication in its most basic form, I just want a simple login system for a very basic site.

 

Ideally i'm trying to do something like this

 

 

' Login button click

Dim username as string = "myusername"

Dim password as string = "mypassword"

 

If txtUsername.text = username And txtPassword.text = password Then

User.IsAuthenticated = True

Response.Redirect "privatearea/main.aspx"

Else

label1.text = "Access Denied"

End If

 

How can I do it?

Posted
Thanks for that, theres a very basic tutorial on there simply using a boolean session value to set if the user is authenticated or not. I think that would do fine for this job.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...