/// <summary> /// Finds a key word inside the html page and replace by a resource file /// </summary> /// <param name="bodyHtmlPage">Current html page</param> /// <param name="key">Key that is going to be replaced</param> /// <param name="resourceFile">Resource file to be included in the page</param> /// <returns></returns> private string LoadResourceAndReplaceByKey(string bodyHtmlPage, string key, string resourceFile) { Stream resourceStream = ResourceUtilities.LoadResourceByUrl(resourceFile); if (resourceStream != null) { var resourceBase64 = ResourceUtilities.ConvertToBase64(resourceStream); bodyHtmlPage = bodyHtmlPage.Replace(key, resourceBase64); } return(bodyHtmlPage); }