aspnet-devexpress-dot-web-dot-aspxhyperlink-d5bbe481.md
Gets or sets the text caption displayed for the hyperlink in the hyperlink editor.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue("")]
public string Text { get; set; }
<DefaultValue("")>
Public Property Text As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String value specifying the text caption for the hyperlink in the editor.
|
This property is a wrapper of the HyperLinkProperties.Text property.
This example demonstrates how to customize the ASPxHyperLink control.
<dx:ASPxHyperLink ID="ASPxHyperLink1" runat="server" Text="DevExpress" NavigateUrl="http://devexpress.com/"
ImageUrl="~/imgs/logo.png">
</dx:ASPxHyperLink>
The following code snippets (auto-collected from DevExpress Examples) contain references to the Text property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
string url = Convert.ToString(PropertyValue);
hyperlink.Text = url;
hyperlink.NavigateUrl = GetResolvedUrl(url);
aspxgridview-dataitemtemplate-runtime/CS/HyperlinkColumn/Default.aspx.cs#L62
link.NavigateUrl = string.Format("~/details.aspx?Device={0}", gridContainer.KeyValue);
link.Text = string.Format("Get details about device {0}", gridContainer.KeyValue);
container.Controls.Add(link);
aspxgridview-hyperlink-based-on-several-cell-values/CS/Solution/Default.aspx.cs#L13
GridViewDataItemTemplateContainer container = link.NamingContainer as GridViewDataItemTemplateContainer;
link.Text = "Show New Form, Key Field = " + container.KeyValue;
link.Target = "_blank";
aspxgridview-dataitemtemplate-hyperlink-popup/CS/Solution/Default.aspx.cs#L20
link.NavigateUrl = "javascript:void(0);";
link.Text = string.Format("More Info: EAN13 - {0}", ean13);
link.ClientSideEvents.Click = string.Format("function(s, e) {{ OnMoreInfoClick('{0}'); }}", contentUrl);
Dim url As String = Convert.ToString(PropertyValue)
hyperlink.Text = url
hyperlink.NavigateUrl = GetResolvedUrl(url)
aspxgridview-dataitemtemplate-runtime/VB/HyperlinkColumn/Default.aspx.vb#L59
link.NavigateUrl = String.Format("~/details.aspx?Device={0}", gridContainer.KeyValue)
link.Text = String.Format("Get details about device {0}", gridContainer.KeyValue)
container.Controls.Add(link)
aspxgridview-hyperlink-based-on-several-cell-values/VB/Solution/Default.aspx.vb#L16
Dim container As GridViewDataItemTemplateContainer = TryCast(link.NamingContainer, GridViewDataItemTemplateContainer)
link.Text = "Show New Form, Key Field = " & container.KeyValue
link.Target = "_blank"
aspxgridview-dataitemtemplate-hyperlink-popup/VB/Solution/Default.aspx.vb#L20
link.NavigateUrl = "javascript:void(0);"
link.Text = String.Format("More Info: EAN13 - {0}", ean13)
link.ClientSideEvents.Click = String.Format("function(s, e) {{ OnMoreInfoClick('{0}'); }}", contentUrl)
See Also