Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
I am creating a Login page in my project (mvc3).
i have username and password which i want to verify from Database.

my view consist of textboxs for username & password,
and a submit button so on button click i want to call
a method in my model.

How can i Call that method.

please help me..
thnks in advance.
Posted

1 solution

hi,

You can use ajax to invoke the method
1)develop a action in login controller which return bool type data
2)don't use [HTTPPost]attribute over the action
3)In ajax call create URL like Controller/Action/data

In this way you can call the method
but it is not a secure way for authentication
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900