How to cross verify user credential in MVC3& redirect to respective view,page not from DB

Posted by ramuvalmiki07-22001 under ASP.NET on 5/1/2013 | Points: 10 | Views : 1730 | Status : [Member] | Replies : 2
Hii to all,
I have a requirement that i need to create a simple Login Page,where i need to cross verify three types of Credentials i.e(Employee,Manager,Administrator)If username is employee i need to redirect to Employees's view's page,If username is Manager i need to redirect to Manager view page,If username is Administrator i need to redirect to Administrator view page.But here i dont have any database,i need to verify from frontend only.Please tell me is there any possibility for verifing it from controller or Model? and should i need to create three different views pages,three Controllers for three different types of users.In ASp.Net we use Responce.Redirect() for redirecting to required page,In MVC3 what is the code for redirecting to other view page.Can anyone help me with the code.Thanks in advance

Thanks
Ramu




Responses

Posted by: Prabhukiran345 on: 5/1/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

1.Keep login controls in Form.Begin and type as "Post".

2.In the controller Write "[HttpPost]" method.

3.And in that juss hotcode your credentials with the textbox text which we get into method.

Revert me back if you need it with complete code that how to do it.

Thanks,
PRABHU KIRAN B

Thanks,
Prabhu Kiran Bommareddy

ramuvalmiki07-22001, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: ramuvalmiki07-22001 on: 5/1/2013 [Member] Starter | Points: 25

Up
0
Down
Dear Prabhu,
Thanks for ur quick response,Though iam not new to .Net but new to MVC, i have tried with ur above steps but it didn't reached my requirement,please provide me with the code so that i can clear idea how and where to write the exact code in MVC.thanks in advance
Thanks
Ramu

ramuvalmiki07-22001, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response