如何在 cshtml 中调用不同的回发?
@{
Page.Title = "";
Layout = "~/_Layout.cshtml";
if(IsPost)
{
// if btn1 is pressed do this
// if btn2 is pressed do this
}
}
<div>
<form action="" method="post">
<input type="submit" value="btn1" />
</form>
<form action="" method="post">
<input type="submit" value="btn2" />
</form>
</div>
有没有办法判断哪个被按下?