I have following code
@Html.Pager((IPagination)Model.FoundUsers).Last("<span class=\"last\"> </span>").First("<span class=\"first\"> </span>").Next("<span class=\"next\"> </span>").Previous("<span class=\"prev\"> </span>")
But it renders encoded and shows <span class="next">
on page.
I tried to used Html.Raw as suggested in Problem with razor view and mvccontrib grid pagination or How to make a pager with MVCContrib and Razor?
but it still does not work for me.
What am I doing wrong ?
I would assume that you are using MvcContrib v2 with Mvc4 (or possibly Mvc3)?
Either manually download the newer libraries from http://mvccontrib.codeplex.com or use the Raw method. So instead of this:
@Html.Pager((IPagination)Model.FoundUsers).Last("<span class=\"last\"> </span>").First("<span class=\"first\"> </span>").Next("<span class=\"next\"> </span>").Previous("<span class=\"prev\"> </span>")
You would instead have:
@Html.Raw(Html.Pager((IPagination)Model.FoundUsers).Last("<span class=\"last\"> </span>").First("<span class=\"first\"> </span>").Next("<span class=\"next\"> </span>").Previous("<span class=\"prev\"> </span>"))