Visit Gigasoft's Web Site
 ProEssentials v9 Help

SerializeToStream OCX Method

Scope All ProEssentials OCX Interfaces

 

SerializeToStream() As Variant

 

The SerializeToStream method is used primarily within an ActiveServerPage to produce a dynamically generated ActiveX object upon page request.

 

Comments

See Also: SaveToStream, JPEGToStream, PNGToStream, OCX Methods.

 

HTML / ASP Example

The following is an example of using SerializeToStream. The example contains two parts, the first part is an HTML page that includes an object tag and data attribute that references the ASP page, the second part contains the ASP page.

 

Part1: HTML page references ASP page containing SerializeToStream.

 

<HTML>

<HEAD></HEAD>

<BODY>

<P>Graph Object Tag with Data Attribute.</P>

<OBJECT classid="clsid:C612BED1-4A73-456F-BAF7-5FF010070F7E"

DATA="http://www.yourserver.com/BuildBinData.asp"

WIDTH="500"

HEIGHT="500" VIEWASTEXT> 

</OBJECT>

</BODY>

</HTML>

 

Part2: Below is BuildBinData.asp page content.

 

<%

dim myobj

Set myobj = server.CreateObject("PEGOG.PegogCtrl.1")

myobj.MainTitle = "Hello Internet"

myobj.PrepareImages = True

myobj.Subsets = 4

myobj.Points = 12

 

dim i

dim j

for i = 0 to 3

for j = 0 to 11

myobj.YData(i,j) = 5 + Rnd(20)

next

next

 

Response.BinaryWrite (myobj.SerializeToStream())

 

Set myobj = Nothing

%>