Share via


ItemPicker.LoadExternalSpanData Method

Manually provides data to a control that the server normally provides during a postback process.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub LoadExternalSpanData ( _
    spanData As String _
)
'Usage
Dim instance As ItemPicker
Dim spanData As String

instance.LoadExternalSpanData(spanData)
public void LoadExternalSpanData(
    string spanData
)

Parameters

  • spanData
    Type: System.String

    A string that contains the data to load.

Remarks

The server usually provides data to the control automatically through the postback process; however, if you need to manually provide data to the control, this method allows you to provide that data by using a string to contain the data. Use this method when working with an external process to provide external data to the control.

The value of the spanData parameter may be an empty string, a search string, or an HTML string. The following list explains the process for each of these possible values.

  • Empty string: The ItemPicker control clears any resolved entity instances and shows an empty text box.

  • Search string: The ItemPicker control will try to resolve the string according to normal entity instance resolution rules. Specifically, it will process the string as if the user pressed CTRL+K or the Resolve button.

  • HTML string: When the HTML string is formatted according to the following example, the ItemPicker control will treat the string as a representation of one or more resolved entity instances. In this case, the ItemPicker will re-read the entity instances in order to validate their display name, and then display them in the text box. (The bulk of this code is static and does not change, but the italicized text is variable and will change.)

    <SPAN class=ms-entity-resolved id=span__bg40001300 title="" contentEditable=false tabIndex=-1>
    <DIV id=divEntityData style="DISPLAY: none" description="" key="__bg40001300" isresolved="True" displaytext="">
    <DIV data=""></DIV></DIV><SPAN oncontextmenu=onContextMenuSpnRw(); onmousedown=onMouseDownRw(); id=content contentEditable=true tabIndex=-1>__bg40001300</SPAN></SPAN>
    

See Also

Reference

ItemPicker Class

ItemPicker Members

Microsoft.SharePoint.WebControls Namespace