You have already done half the work, now in home controller make an actionresult
[HttpPost]
public ActionResult Index(int id, string customerCode, int amount)
{
// work here.
}
form post method will call this method, as you have specified it in the begin form parameters.
It will be better if you use a model for passing values and use it in view for form elements
[HttpPost]
public ActionResult Index(ModelName modelinstance)
{
// work here.
}
Sample loginModel
public class LoginModel
{
[Required]
[Display(Name = "Username:")]
public String UserName { get; set; }
[Required]
[Display(Name = "Password:")]
[DataType(DataType.Password)]
public String Password { get; set; }
}
now if was using this login model in the form
then for the controller action, modelinstance is simply the object of model class
[HttpPost]
public ActionResult Index(LoginModel loginDetails)
{
// work here.
}
if you have a lot of variables in the form then having a model helps as you don't need to write for all the properties.