.cshtml
<input type="button" value="Create" onclick="window.location.href = '/Controller/Action' />
ModelClass
<input type="button" value="Create" onclick="window.location.href = '/Controller/Action' />
ModelClass
public class MovieModel
{
public int ID { set; get; }
public string FirstName { set; get; }
public string SecondName { set; get; }
public DateTime DOB { set; get; }
public string Type{ set; get; }
}
public ActionResult Create()
{
decimal principle = Convert.ToDecimal(Request["txtAmount"].ToString());
decimal rate = Convert.ToDecimal(Request["txtRate"].ToString());
int time = Convert.ToInt32(Request["txtYear"].ToString());
}
No comments:
Post a Comment