ASPxHyperLink Class
Represents a text editor with hyperlink functionality.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public class ASPxHyperLink :
ASPxStaticEdit
#Related API Members
The following members return ASPxHyperLink objects:
#Remarks
The ASPxHyperLink editor diplays its contents as a hyperlink.
#Create a Hyperlink
#Design Time
The ASPxHyperLink control is available on the DX.24.2: Common Controls toolbox tab in the Microsoft Visual Studio IDE.
Drag the control onto a form and customize the control’s settings, or paste the control’s markup in the page’s source code.
<dx:ASPxHyperLink ID="link" runat="server" Text="Demos" NavigateUrl="https://demos.devexpress.com/asp/" />
#Run Time
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)
{
ASPxHyperLink link = new ASPxHyperLink();
link.ID = "link";
Page.Form.Controls.Add(link);
link.NavigateUrl = "https://demos.devexpress.com/asp/";
link.Text = "Demos";
}
Note
DevExpress controls require that you register special modules, handlers, and options in the Web.
To activate the editor’s hyperlink functionality the ASPxHyperLink.NavigateUrl property should be defined which specifies the command to execute when the editor’s hyperlink is clicked. The action performed by the ASPxHyperLink editor is determined by the protocol prefix included in the specified URL of the hyperlink. For instance:
- “https://www.devexpress.com/“ - opens the DeveloperExpress, Inc. website. Note, that specifying a website URL without the protocol prefix results in an attempt to open the specified website from the project’s folder.
- “file:///c:\images\blue.bmp” - opens the image located at the specified path.
The ASPxHyperLink.Target property specifies the frame where the hyperlinked document will be displayed.
The content of the editor’s hyperlink can be represented by either a caption text or an image. The editor’s caption text can be specified by the ASPxHyperLink.Text property. To define an image use the ASPxHyperLink.ImageUrl property which if set has priority over the caption text.
Note
The client-side equivalent of this editor control is represented by the ASPxtrue
, or any client event is handled. Available client events can be accessed via the ASPx