Reputation: 117
I have two text boxes UserName and Password in a view, when click on the submit button I have to compare the username and password in the controller and give the access to the other view,
I am not using any database to pull up username and password, I am using this for example practice.
Upvotes: 0
Views: 225
Reputation: 1810
Just let your controller accept a model that is binded in your view - with UserName and Password properties. Then depending on your logic in the controller render the specific view.
You could take a look at the AccountController class in the ASP.Net MVC sample project, I'm pretty sure you'll get the right direction in solving this.
Hope this helps.
Upvotes: 1