skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class HyperlinkHelper

Provides utility methods for validating, processing, and handling hyperlinks within Telerik controls.

Inheritance
System.Object
HyperlinkHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll

Syntax

public static class HyperlinkHelper
Remarks

Supports validation of HTTP/HTTPS URLs, FTP links, mailto addresses, UNC paths, OneNote links, and web URLs using both URI scheme validation and pattern matching approaches.

Methods

ShowMessage(String, String, String)

Displays a warning message box to the user with hyperlink-related information.

Declaration
public static void ShowMessage(string hyperlink, string message, string caption)
Parameters
System.String hyperlink

The hyperlink that is associated with the message, which will be appended to the message text.

System.String message

The message text to display to the user, typically describing the issue or validation result.

System.String caption

The caption text for the message box title bar.

Remarks

Shows hyperlink-related messages with a warning icon and OK button. The hyperlink parameter is appended to the message text so users can see exactly which link caused the issue.

ValidateLinkPattern(String)

Validates a hyperlink using regular expression pattern matching to support a broader range of link formats.

Declaration
public static bool ValidateLinkPattern(string hyperlink)
Parameters
System.String hyperlink

The hyperlink string to validate against the supported patterns.

Returns
System.Boolean

true if the hyperlink matches any of the supported patterns (URL patterns or email patterns); otherwise, false.

Remarks

This method provides more flexible validation than ValidateLinkScheme(String) by using regular expression patterns to match various hyperlink formats. It supports:

  • HTTP and HTTPS URLs (with or without www prefix)
  • FTP URLs
  • Mailto links
  • UNC paths (\server\path)
  • OneNote links
  • Web addresses starting with www
  • Email addresses

This validation is more permissive than URI scheme validation and is useful for scenarios where you want to accept a wider variety of link formats, including those that might need preprocessing before being used as actual URLs.

Examples
// Valid patterns
bool result1 = HyperlinkHelper.ValidateLinkPattern("https://example.com"); // returns true
bool result2 = HyperlinkHelper.ValidateLinkPattern("www.example.com"); // returns true
bool result3 = HyperlinkHelper.ValidateLinkPattern("user@example.com"); // returns true
bool result4 = HyperlinkHelper.ValidateLinkPattern("\\\\server\\share"); // returns true
bool result5 = HyperlinkHelper.ValidateLinkPattern("onenote:page-link"); // returns true

// Invalid patterns
bool result6 = HyperlinkHelper.ValidateLinkPattern("just text"); // returns false
bool result7 = HyperlinkHelper.ValidateLinkPattern(""); // returns false

ValidateLinkScheme(String)

Validates a hyperlink using strict URI scheme validation to ensure it conforms to standard URI formats.

Declaration
public static bool ValidateLinkScheme(string hyperlink)
Parameters
System.String hyperlink

The hyperlink string to validate.

Returns
System.Boolean

true if the hyperlink is a valid absolute URI with an HTTP, HTTPS, or mailto scheme; otherwise, false.

Remarks

Performs strict validation using the .NET Uri class. Only accepts URLs with HTTP, HTTPS, or mailto schemes. More restrictive than ValidateLinkPattern and should be used when strict validation is required.

Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.