这是我认为的代码:
@model SuburbanCustPortal.Models.CustomerModel
@{
ViewBag.Title = "Customer Summary"; }
<h2>Customer Summary Screen</h2> <p>
Please select an account below or add an existing account. </p>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")"
type="text/javascript"></script> <script
src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"
type="text/javascript"></script>
@using (Html.BeginForm()) {
@Html.ValidationSummary(true, "Account
creation was unsuccessful. Please correct the errors and try again.")
<div>
<fieldset>
<legend>Existing Accounts</legend>
@Html.Action("ExistingAccounts2")
<p>
<input type="submit" value="Add an Account" />
</p>
</fieldset>
</div>
}
我在上面调用的部分视图中有这段代码:
@model SuburbanCustPortal.Models.CustomerModel
<table>
@foreach (var usr in ViewBag.CustomerData)
{
<tr>
<td>
@using (Html.BeginForm("ShowCustomer","Customer"))
{
<input class="button" id="@usr.AccountId" type="submit" value="Submit" />
}
</td>
<td>@usr.Branch@usr.AccountNumber</td>
<td>@usr.Name</td>
<td>@usr.DeliveryStreet</td>
</tr>
}
</table> <br />
它显示如下:
为什么我的按钮显示在文本的其余部分上方?我目前在网站上没有 css,所以不应该干扰......
我在看什么?