public string GenerateUrl(int id, string title, DateTime date) { // /[YEAR]/[MONTH]/[DAY]/20/[calculatedid+catid]/[news title] << NEWS // format the url var friendlyUrl = string.Format("/{0}/{1}/{2}/{3}/{4}/{5}", date.Year, date.Month, date.Day, ModuleId, id > 0 ? UrlUtility.Scramble(id).ToString() : "[TBD]", UrlUtility.CleanTitle(title)); // return return(friendlyUrl); }
public string GenerateUrl(int id, string title, DateTime date) { //var friendlyUrl = string.Format("/{0}/{1}/{2}/{3}/{4}/{5}", // date.Year, // date.Month, // date.Day, // ModuleId, // id > 0 ? UrlUtility.Scramble(id).ToString() : "[TBD]", // UrlUtility.CleanTitle(title)); var friendlyUrl = string.Format("/{0}/{1}/{2}", ModuleId, id > 0 ? UrlUtility.Scramble(id).ToString() : "[TBD]", UrlUtility.CleanTitle(title)); return(friendlyUrl); }