Link25
Link25 is a reusable ASP.NET helper control used to generate HTML anchor elements
with optional icons, images, FontAwesome icons, tooltips, popup behavior, and new-tab navigation.
Key Features
- Standard hyperlink generation
- Support for Icon25 icons
- Support for FontAwesome icons
- Image-based links
- Popup window support
- Open link in new tab
- Tooltip support
Public Enums
LabelSize
| Value | Description |
| S1 – S5 | Predefined label sizes |
| Max | Maximum predefined size |
| Auto | Automatically adjusted size |
LabelColor
| Value | Description |
| Green | Green label color |
| Red | Red label color |
| Yellow | Yellow label color |
| Blue | Blue label color |
| Cyan | Cyan label color (default) |
| Grey | Grey label color |
| Black | Black label color |
| None | No color styling |
LabelIconAlign
| Value | Description |
| Left | Icon displayed to the left of text |
| Right | Icon displayed to the right of text |
Properties Class
The Link25.Properties class is used to configure the link before rendering HTML.
| Property | Type | Description |
| Name | string | Text displayed for the link |
| TargetUrl | string | URL to navigate to |
| Icon | Icon25.IconCollection | Predefined Icon25 icon |
| IconSize | Icon25.IconSize | Size of the icon |
| FontAwesomeIcon | string | FontAwesome icon class |
| ImageUrl | string | Image URL for image-based links |
| ImageHeight | string | CSS height of the image |
| ImageWidth | string | CSS width of the image |
| ToolTip | string | Tooltip text |
| NewTab | bool | Opens link in a new browser tab |
| ShowPopup | bool | Opens link in a popup window |
| PopupHeight | int | Popup window height |
| PopupWidth | int | Popup window width |
| LabelColor | LabelColor | Label color styling |
| LabelSize | LabelSize | Label size styling |
| LabelIconAlign | LabelIconAlign | Icon alignment |
| BackgroundColor | string | Custom background color |
| Color | Color | Text color |
Sample Code
Basic Text Link
var link = new Link25();
link.AddUrl(new Link25.Properties
{
Name = "Open Dashboard",
TargetUrl = "/Dashboard"
});
var html = link.GetHtml();
Link with Icon
link.AddUrl(new Link25.Properties
{
Name = "Info",
TargetUrl = "/Info",
Icon = Icon25.IconCollection.Info,
IconSize = Icon25.IconSize.S2,
ToolTip = "More information"
});
Link Opening in New Tab
link.AddUrl(new Link25.Properties
{
Name = "External Site",
TargetUrl = "https://example.com",
NewTab = true
});
Popup Link
link.AddUrl(new Link25.Properties
{
Name = "Preview",
TargetUrl = "/Preview",
ShowPopup = true,
PopupWidth = 600,
PopupHeight = 400
});