0

I am new to mvc3 and I am trying to create a login. I do not want to use the LogOn view. Basically, the user will enter his/her username and password,then I ll check it if the user exists in my database,then if the user exists,he/she will go through next page.I have implemented the searching part of the user in database.Could you help me?

1 Answer 1

1

In your LogOn controller action, once you have verified the credentials of the user against your database and emitted the authentication cookie you could simply return a RedirectToAction:

return RedirectToAction("SomeNextAction", "SomeController");
Sign up to request clarification or add additional context in comments.

2 Comments

alright but what about if the user enters the url of the page which the user is suppose to go on after login?
Add the [Authorize] attribute to controllers/actions which require authentication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.