/// <summary> /// FormatExpiryDate formats the format name as an a tag /// </summary> public string FormatPortalAliases(int portalID) { var str = new StringBuilder(); try { var objPortalAliasController = new PortalAliasController(); var arr = objPortalAliasController.GetPortalAliasArrayByPortalID(portalID); PortalAliasInfo objPortalAliasInfo; int i; for (i = 0; i <= arr.Count - 1; i++) { objPortalAliasInfo = (PortalAliasInfo)arr[i]; var httpAlias = Globals.AddHTTP(objPortalAliasInfo.HTTPAlias); var originalUrl = HttpContext.Current.Items["UrlRewrite:OriginalUrl"].ToString().ToLowerInvariant(); httpAlias = Globals.AddPort(httpAlias, originalUrl); str.Append("<a href=\"" + httpAlias + "\">" + objPortalAliasInfo.HTTPAlias + "</a>" + "<BR>"); } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } return(str.ToString()); }
/// <summary> /// FormatExpiryDate formats the format name as an a tag /// </summary> public string FormatPortalAliases(int portalID) { var str = new StringBuilder(); try { var arr = PortalAliasController.Instance.GetPortalAliasesByPortalId(portalID).ToList(); foreach (PortalAliasInfo portalAliasInfo in arr) { var httpAlias = Globals.AddHTTP(portalAliasInfo.HTTPAlias); var originalUrl = HttpContext.Current.Items["UrlRewrite:OriginalUrl"].ToString().ToLowerInvariant(); httpAlias = Globals.AddPort(httpAlias, originalUrl); str.Append("<a href=\"" + httpAlias + "\">" + portalAliasInfo.HTTPAlias + "</a>" + "<BR>"); } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } return(str.ToString()); }