日期:2014-05-17 浏览次数:20409 次
private void AppendLink(StringBuilder output, string format, int page, RouteValueDictionary routeValues)
{
string url = UrlHelper.GenerateUrl(
settings.RouteName, settings.ActionName, settings.ControllerName,
settings.Protocol, settings.HostName, settings.Fragment,
routeValues, RouteTable.Routes, htmlHelper.ViewContext.RequestContext, true);
output.AppendFormat(format, page, url);
}
page = 1;
routeValues["page"] = page;
AppendLink(output, "<a href='{1}'>{0}</a>", page, routeValues);