This documentation is archived and is not being maintained.

PageAdapter::RenderBeginHyperlink Method (HtmlTextWriter, String, Boolean, String)

Renders an opening hyperlink tag that includes the target URL to the response stream.

Namespace:  System.Web.UI.Adapters
Assembly:  System.Web (in System.Web.dll)

public:
virtual void RenderBeginHyperlink(
	HtmlTextWriter^ writer, 
	String^ targetUrl, 
	bool encodeUrl, 
	String^ softkeyLabel
)

Parameters

writer
Type: System.Web.UI::HtmlTextWriter

The HtmlTextWriter containing methods to render the target-specific output.

targetUrl
Type: System::String

The String value holding the target URL of the link.

encodeUrl
Type: System::Boolean

true to use HtmlAttributeEncode to encode the stream output; otherwise, false.

softkeyLabel
Type: System::String

The String value to use as a soft key label.

The RenderBeginHyperlink method writes an opening hyperlink tag. When writer is HtmlTextWriter, this tag has the following format:

<a href="targetUrl">

Notes to Inheritors:

When you inherit from the PageAdapter class, you can override the RenderBeginHyperlink method to write a different format for an opening hyperlink tag or to write additional tag attributes. For example, the RenderBeginHyperlink base method does not write an attribute for softkeyLabel.

The following code example demonstrates how to derive a class named CustomPageAdapter from the PageAdapter class and override the RenderBeginHyperlink method. The RenderBeginHyperlink method adds an attribute named src to a hyperlink, which contains a reference to the current page. All hyperlinks rendered in pages to which CustomPageAdapter is attached will have the src attribute.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: