tags:

views:

43

answers:

2

I have looked and so far not been able to find the answer. When a user creates a new account i want the user to be automatically logged into the site as opposed to just being redirected to the log in page. I am able to create the users but am unsuccessful at finding logging them in.

+2  A: 

If you are using forms authentication, you can create the authorization cookie using the SetAuthCookie method like this:

FormsAuthentication.SetAuthCookie(txtUserName.Text, false);
Anero
A: 

I am and thank you.

gorrilla
For future reference, use the "Add Comment" link to reply to answers instead of making a new a new answer
Chris T
Also, if the answer solved your question please accept it as a answer for the thread.
Anero