This value object wraps an HTML string for a hyperlink and allows users to get and set certain value object properties and then get the resulting <A> tag HTML markup string. If the NavigateUrl property does not have a value, the ToString method returns an empty string. In other cases, the ToString method returns an HTML string that contains an <A> tag. Only certain properties are recognized on the <A> and <IMG> tags and used to generate the HTML string.
Recognized properties for <A> tag:
Recognized properties for <IMG> tag:
-
src
-
Instances are usually retrieved from a SPListItem field value for the LinkField column. It is also the object used to store the posted value in a Value and Value control. You can also construct a new instance directly either as an empty value or based on HTML string that conforms to the basic pattern of an <A> tag optionally containing an icon <IMG> tag. After retrieving this value from an SPListItem field and changing any properties on this object, you must set the value object back into the SPListItem field value and use the Update method to store the value.