GetCDFString Method

The GetCDFString method generates a subset of the CDF formatted string defined by the loaded Project object and the list of Channel.GUID values passed, placing the string into the third "out" argument.

VBScript Syntax

ICDFGenHelper.GetCDFString  ChannelList,  ListStyle, CDFStringout

Parameters

ChannelList

The user's array list of channel GUIDs. (VT_ARRAY)

ListStyle

A Boolean specifying the nature of the list. TRUE means the list is for inclusion (VT_BOOL)

CDFStringout

On return, the personalized CDF string. (VT_BSTR)

Remarks

This method is invoked automatically during the execution of the Push.CDFGenerator.Run method.

Example

The example below shows how an object of this class can be used to return a personalized CDF string for a user.

VBScript in an ASP page

<% 
    '  The object is usually pre-created and
    '  stored in the Application object.  In this case,
    ' assume the object is stored in the Application Dictionary
    ' under the key "SomeName"

    Application("SomeName").GetSelectionListPropName LName, LStyle
    Set AUO = Server.CreateObject("Membership.UserObjects")
    List = AUO.Get LName
    Style = AUO.Get LStyle
    
    ' Spit out the CDF string to the Response stream
    Response.ContentType = "application/x-cdf"
    Application("SomeName").GetCDFString List,Style,Outstring
    Response.Write Outstring
    Response.End

GetSelectionListPropName Method

The GetSelectionListPropName method gets the names of the user properties in the Membership directory service. These strings are properties of the currently loaded Project object.

VBScript Syntax

ICDFGenHelper.GetSelectionListPropName  ListPropName,  StylePropName

Parameters

ListPropName

On return, a string containing the name of the user property in the directory that stores the channel selections (VT_BSTR).

StylePropName

On return, a string containing the name of the user property in the directory that stores the type of list (VT_BSTR).

Remarks

The values set in the passed parameters are fetched from the currently loaded Project object. Attempting to fetch these values before the Load method has been invoked will cause an exception to occur.

Example

VBScript in an ASP page

<% 
'  The CDFGenHelper is normally kept in the Application Dictionary
'  under some friendly name.  Assume "CDFGenHelper" for this example

Application("CDFGenHelper").GetSelectionListPropName( Listname, ListStyle)

%>

See Also

Project SelectionListPropName Property

Project SelectionStylePropName Property


© 1997-1998 Microsoft Corporation. All rights reserved.