private static string AutoCategoryLink(Match match) { if (match.Groups["term"].Success) { return("<a href=\"" + CategoryUrlConfig.PrepareUrl(match.Groups["term"].Value, "blogs/") + "\" title=\"" + match.Groups["term"].Value.ToString().Trim() + "\">" + match.Groups["term"].Value.ToString() + "</a>"); } else { // no match return(match.Groups["hrefurl"].Value); } }
public static async Task <string> Bing_CategorySitemap(ApplicationDbContext context, CategoryEntity Entity) { var str = new StringBuilder(); str.AppendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); str.AppendLine("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">"); var _lst = await CategoryBLL.LoadItems(context, Entity); string path = "videos/"; foreach (var Item in _lst) { str.AppendLine("<url>"); str.AppendLine("<loc>" + CategoryUrlConfig.PrepareUrl(Item, path) + "</loc>"); str.Append("</url>"); } str.AppendLine("</urlset>"); return(str.ToString()); }