I create a MvcContrib.UI.Grid in my ASP.NET C# MVC 3 applicatio. I create pageer for this
grid.Please see my pager code
@using MvcContrib.UI.Pager
@using MvcContrib.Pagination
@model IPagination
@Html.Pager(Model).First("First").Last("Last").Next("Next").Previous("Previous")
call the Pager.cshtml in my View. please see the below image
But finally it's rendering like.
I am clueless. Please help me.
If your are writing a plain string
with the @
sign to the response razor automatically html encodes it for you.
Because Html.Pager
returns just a plain string
containing the html so you need to use Html.Raw
to prevent the automating encoding in Razor:
So you need to change your Pager partial view to:
@Html.Raw(Html.Pager(Model)
.First("First")
.Last("Last")
.Next("Next")
.Previous("Previous").ToString())