private TagBuilder GenerateLink(string linkText, string routeValue) { var routeValues = new RouteValueDictionary(_routeValues) { { RouteParameter, routeValue } }; if (RouteParameters != null) { var values = RouteParameters.GetType().GetProperties(); if (values.Any()) { foreach (var propertyInfo in values) { routeValues.Add(propertyInfo.Name, propertyInfo.GetValue(RouteParameters)); } } } return(Generator.GenerateActionLink( viewContext: ViewContext, actionName: ActionName, controllerName: Controller, routeValues: routeValues, hostname: Host, linkText: linkText, fragment: Fragment, htmlAttributes: new { @class = PageLinkCss }, protocol: Protocol)); }