我有一个控制器,它具有索引和付款两种方法。我要在“索引”视图中单击一个按钮,但我想将其重定向到“付款”视图,但仅将其重定向到“索引”视图
<input type="submit" value="Payment" class="btn btn-default btn-send" id="submit" name="submit"onclick="window.location='@Url.Action("Payment", "Home")'" />
public ActionResult Index()
{
return View();
}
public ActionResult About()
{
ViewBag.Message = "Your application description page.";
return View();
}
public ActionResult Contact()
{
ViewBag.Message = "Your contact page.";
return View();
}
public ActionResult Payment()
{
ViewBag.Message = "Your contact page.";
return View();
}