<% dim NO dim YES dim HTTP dim HTTPS dim Scheme dim PathToPA dim RepostURL dim PostingURL dim AllowAnonymous NO = "NO" YES = "YES" HTTP = "http" HTTPS = "https" Scheme = HTTP PathToPA = Scheme + "://" + Request.ServerVariables("SERVER_NAME") + "/scripts/cpshost.dll" RepostURL = Scheme + "://" + =>Request.ServerVariables("SERVER_NAME") + "/scripts/repost.asp" PostingURL = PathToPA + "?PUBLISH?" + RepostURL AllowAnonymous = YES PublishingURL = "/Sites/Publishing" SitesURL = "/Sites/Publishing" TargetURL = Scheme + "://" + Request.ServerVariables("SERVER_NAME") + "/uploadfiles/" FluplVersion = "7,0,783,0" %> 'Note: Several parameters, such as the TargetURL, are 'also defined in the "PostInfo file". If the 'parameter is used in client or server side script 'prior to the initialization of the Posting Acceptor 'the values will need to be defined in the script as 'well. In our examples we reference these variables 'to control the user interface prior to the upload of 'the content. 'The ActiveX Upload component supports the methods 'displayed in the table below. Method Description AboutBox Displays information about the File Upload Control CreatePermBinding Creates a permanent site and binds to it. CreateTempBinding Creates a temporary site and binds to it. FoundPostInfo Checks whether a postinfo file was found on the target server. SetBindingParam Sets binding parameters. 'The CreatePermBinding and CreateTempBinding allow 'you to tell the component whether or not you want to 'retain the site on the client machine after the post 'is complete. If the site definition will only be 'used for a single session you should use the 'CrateTempBinding method otherwise you should use the 'CreatePermBinding. In our example we use temporary 'sites so we call the CreateTempBinding method. 'As with any ActiveX control, to add the control to a 'page you insert the appropriate <OBJECT> tag. <OBJECT align=textmiddle classid=clsid:886E7BF0-C867-11CF-B1AE-00AA00A3F2C3 codeBase="<%= PublishingURL %> /FlUpl.cab#Version=<%= FluplVersion %>" height=100 id=IFlUpl1 width = 100 color = blue VIEWASTEXT> <PARAM NAME = "ImageSrc" VALUE=""> <PARAM NAME = "AlternateGraphic" VALUE = "0"></OBJECT> 'In this example we use the parameter values 'specified earlier to identify the location of the 'CAB file and it's version number. In the Body 'OnLoad event we call the InitializeControl 'subroutine. Sub InitializeControl() IFlUpl1.CreateTempBinding "<%=TargetURL %>", "" End Sub 'This subroutine calls the CreateTempBinding method 'of the control and sets the target site to the site 'identified in the TargetURL variable. The second 'parameter specifies the protocol to use for the 'upload. Two additional events are also triggered by 'the upload control: IFlUpl1_UploadFile() IFlUpl1_UploadComplete()