[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

automatically login user after registering

Posted on 2011-02-10
4
Medium Priority
?
491 Views
Last Modified: 2012-05-11
when a user registers using the standard asp.net membership register functionality, i need to log them in automatically and take them to their profile page to update more details

Can you explain how I would do this please and provide code examples of tutorials
thanks
0
Comment
Question by:websss
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 14

Accepted Solution

by:
robasta earned 2000 total points
ID: 34868678
login the user with the details they supplied on the registration page e.g.

public sub Register(string username, string password, email){

 MembershipCreateStatus createStatus = MembershipService.CreateUser(model.UserName, model.Password, model.Email);
                if (createStatus == MembershipCreateStatus.Success)
                {
                   FormsAuthentication.Authenticate(username, password);
                    Response.Redirect("profilepage.aspx");
                }else{//show registration errors}
}
0
 

Author Comment

by:websss
ID: 35079050
Thanks
should this work on its own?

  FormsAuthentication.Authenticate("myusername", "mypassword");
  Response.Redirect("profilepage.aspx");
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 35906813
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question