如何在MVC 4(Razor)中创建普通的旧图像按钮? 我正在寻找这样的东西
答案 0 :(得分:13)
试试这个
@using (Html.BeginForm("ActionTaken", "TestController")) {
<button name="button" value="ActionOne" class="button" style="width: 200px;">
<img src=""/></button>
<button name="button" class="button" style="width: 160px;" value="ActionTwo">
<img src=""/></button> }
答案 1 :(得分:6)
将此添加到您的剃须刀视图中:
<input type="image" src="<image path here>" alt="Submit" width="48" height="48">