Share via


LinkFieldValue constructor

Constructs a new empty instance of a LinkFieldValue object.

Namespace:  Microsoft.SharePoint.Publishing.Fields
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New LinkFieldValue()
public LinkFieldValue()

Examples

using SPListItem = Microsoft.SharePoint.SPListItem;
using LinkFieldValue = Microsoft.SharePoint.Publishing.Fields.LinkFieldValue;

namespace Microsoft.SDK.SharePointServer.Samples
{
public static LinkFieldValue GetLinkFieldValueFromHtml(string htmlMarkupForLink)
        {
            string htmlForLinkFieldValue = htmlMarkupForLink;
            if (string.IsNullOrEmpty(htmlMarkupForLink))
            {
                htmlForLinkFieldValue = DefaultLinkFieldValueHtml;
            }

            LinkFieldValue newLinkFieldValue = new LinkFieldValue(htmlForLinkFieldValue);

            // The NavigateUrl, Tooltip, Text, and other properties
            // reflect any recognized property values from the tags
            //in the HTML markup.

            return newLinkFieldValue;
        }
    }
}

See also

Reference

LinkFieldValue class

LinkFieldValue members

LinkFieldValue overload

Microsoft.SharePoint.Publishing.Fields namespace