Export (0) Print
Expand All

HtmlDocument.Title Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the text value of the <TITLE> tag in the current HTML document.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public string Title { get; set; }
/** @property */
public String get_Title ()

/** @property */
public void set_Title (String value)

public function get Title () : String

public function set Title (value : String)

Property Value

The title of the current document.

Use the Title property to identify the document by way of a human-readable name.

Changes to this property will also reflect in the DocumentTitle property of the WebBrowser control.

The following code example creates an HTML hyperlink to the current document using the URL of the document as the link's location and the title of the document as the link text. The code example requires that your application has a WebBrowser control named WebBrowser1.

Private Sub ExportDocumentLink()
    If (WebBrowser1.Document IsNot Nothing) Then
        Dim Link As String = "<A HREF=""" & WebBrowser1.Document.Url.ToString() & """>" & WebBrowser1.Document.Title & "</A>"

        Dim DataObj As IDataObject = Clipboard.GetDataObject()
        DataObj.SetData("Html", True, CObj(Link))
    End If
End Sub

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft