I am developing a search page using MVC4 and Bootstrap
The top line includes the search criteria
The second line displays Page x of x
The rest of the page includes the list of data
When the page fist renders the formatting is correct, however when I click any of the paging buttons/icons, the second line renders between the table header and table data.
Below is my code
Controller Code - sending to View
The view works and the Partial does not
if (Request.IsAjaxRequest())
{
return PartialView("_CashFlowList", _acctCashFlow);
}
return View(_acctCashFlow);
Ajax.BeginForm
@using (Ajax.BeginForm("Index", "AcctCashFlow", new AjaxOptions()
{
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "cashFlowList",
}))
{
<div class="container" style="padding-left: 50px">
<div class="row" style="background-color: lightgray">
<div class="col-md-7 col-sm-offset-1">
Filter
<select id="rangeFilter" name="rangeFilter">
<option value="YTD">Year to Date</option>
<option value="R12">Rolling 12 months</option>
</select>
Go To
<select id="cashCategory" name="cashCategory">
@foreach (var item in @Model._lstCFT)
{
<option value="@item.Id">@item.Description</option>
}
</select>
<input type="submit" value="Search" />
<input type="text" id="idPage" name="pageNumber" style="display:none" />
<input type="text" id="idMaxPage" name="totalPages" style="display:none" />
<input type="text" id="idAction" name="pageAction" style="display:none" />
<button class="btn-sm" id="idFirst"></button>
<button class="btn-sm" id="idPrev"></button>
<button class="btn-sm" id="idNext"></button>
<button class="btn-sm" id="idLast"></button>
</div>
</div>
@Html.Partial("_cashFlowList", @Model)
</div>
The Partial View
The Page Line
<div class="row" style="background-color: lightgray">
<div class="col-md-4 col-sm-offset-8">
Page <label id="idCurrPage" style="width:10px">@Model.CurrentPage </label> of <label id="idTotPage">@Model.TotPages</label>
</div>
</div>
The Data
Table Header
<div class="row">
<div class="col-md-11 col-sm-offset-1" style="padding-left: 35px">
Table Data<pre lang="HTML">
@foreach (var item in @Model._cashFlowlist)
{
@if (item.Description == null)
{
What I have tried:
Google, MSDN, rearranging the Partial View
Date | Symbol |
@Html.DisplayFor(modelItem => @item.TradeDate)
|