我如何使用 MVC Razor 增加和减少锚标记内的@currentpage 值?
@{
double pagesize = Math.Ceiling(Convert.ToDouble(@ViewData["count"]) / 10);
int currentpage = Convert.ToInt32(@ViewData["id"]);
}
<a href="/Home/Index/@currentpage-1">Prev</a>
<a href="/Home/Index/@currentpage+1">Next</a>