I have defined an select on top of my page which shows pageSize(item list pr page)
<select name="ddlPageSize" style="text-align:left;width:80px;">
@for (var i = 5; i <= 100; i=i+5){
<option>@i</option>
}
</select>
now when i wants to set page size in pagging link like.
<div style="width:inherit; padding:15px 0; clear:both;">
<ul style="text-align:center">
@for (int i = 0; i < (int)Math.Ceiling((decimal)totalCount / (decimal)pageSize); i++)
{
int page = i + 1;
string background = "transparent";//transparent
if (pageNo == page)
{
background = "grey";
}
<li style="display:inline; font-size:14px; color:#000; font-weight:bold; font-family:'VAGRound';padding:0 0px; background-color:@background; ">
<a href="~/Admin/Userspagging?page=@page">@page</a>
</li>
}
</ul>
</div>
in html anchor i wants to pass selected page size too with page Number
<a href="~/Admin/Userspagging?page=@page & size=@pageSize">@page</a>