Exemple #1
0
 /// <summary>
 /// Appends an inlined email (mailto:) link.
 /// </summary>
 /// <param name="htmlText">An <see cref="IHtmlText"/> representing the HTML control.</param>
 /// <param name="email">A <see cref="String"/> representing the email address to create the link for.</param>
 public static void AppendEmail(this IHtmlText htmlText, string email)
 {
     htmlText.AppendLink(new Link("mailto:" + email)
     {
         Text = email
     });
 }
Exemple #2
0
 /// <summary>
 /// Appends an inlined telephone (tel:) link.
 /// </summary>
 /// <param name="htmlText">An <see cref="IHtmlText"/> representing the HTML control.</param>
 /// <param name="telephone">A <see cref="String"/> representing the telephone number to create the link for.</param>
 public static void AppendTelephone(this IHtmlText htmlText, string telephone)
 {
     htmlText.AppendLink(new Link("tel:" + telephone.Replace(" ", string.Empty))
     {
         Text = telephone
     });
 }
Exemple #3
0
 /// <summary>
 /// Inserts an inlined image with a link attached to it.
 /// </summary>
 /// <param name="htmlText">An <see cref="IHtmlText"/> representing the HTML control.</param>
 /// <param name="imageSource">A <see cref="String"/> representing the image source value.</param>
 /// <param name="url">A <see cref="String"/> representing the URL to navigate to when the image is selected.</param>
 public static void InsertImageLink(this IHtmlText htmlText, string imageSource, string url)
 {
     htmlText.AppendLink(new Link(url)
     {
         ImagePath = imageSource
     });
 }