2

This is the code in my view:

 @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>
 }

I have this code in the partial view that is being called by the above:

 @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 />

It displays like this:

enter image description here

Why is my button showing up above the rest of the text? I have no css on the site at this point so that shouldn't interfere...

What am I overlooking?

tereško
  • 56,151
  • 24
  • 92
  • 147
ErocM
  • 4,151
  • 22
  • 84
  • 152
  • Gotta love a question that is asked 2 years ago being marked as duplicate just now. Welcome to Stack Overflow, where people look to make their mark, right or wrong, even on outdated questions. – ErocM May 14 '14 at 13:44

0 Answers0