Accessing form data in to controller using parameters ?

Posted by Sunny.Sagar under ASP.NET MVC category on | Points: 40 | Views : 596
public ActionResult ReceiveWithParameter(string txtUserName,
string txtPassword)
if (txtUserName.Equals("user",
StringComparison.CurrentCultureIgnoreCase) && txtPassword.Equals("pass", StringComparison.CurrentCultureIgnoreCase))
return Content("Login successful !");
return Content("Login failed !");

The parameters name of this action method are same as the name of the element

Comments or Responses

Login to post response