AudienceManager.ValidateIsIncludedFilter(String) AudienceManager.ValidateIsIncludedFilter(String) AudienceManager.ValidateIsIncludedFilter(String) Method


Verifies the validity of the specified string of globally unique identifiers (GUID)s for an audience.

 virtual System::String ^ ValidateIsIncludedFilter(System::String ^ PersistedString);
public string ValidateIsIncludedFilter (string PersistedString);
Public Function ValidateIsIncludedFilter (PersistedString As String) As String
String String String

String of comma-delimited GUIDs for an audience.


String that is a substring of the PersistedString parameter that contains a comma-delimited list of valid GUIDs.



<p>The following code example shows how to use the <strong>ValidateIsIncludedFilter</strong> method to verify a list of audience GUIDs.</p>
<pre><code>string PersistedString;

string ValidatedString; AudienceManager AudMgr = new AudienceManager();

PersistedString = "'00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000001'"; ValidatedString = AudMgr.ValidateIsIncludedFilter(PersistedString);

Dim PersistedString As String
Dim ValidatedString As String
Dim AudMgr As New AudienceManager()

PersistedString = "'00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000001'"
ValidatedString = AudMgr.ValidateIsIncludedFilter(PersistedString)


The ValidateIsIncludedFilter method implements the ValidateIsIncludedFilter(String) method of the IRuntimeFilter interface of the Microsoft.SharePoint.WebPartPages namespace. This verifies data that is persisted by Web Parts before committing that data to the database. This method is used mainly when importing audience data. The validity of each GUID in the PersistedString parameter is checked. If the GUID is invalid or does not appear in the content database, it is discarded. The return string contains only valid audience GUIDs.

Applies to