%@ LANGUAGE = VBSCRIPT %>
<% Option Explicit %>
<% Response.ContentType = "application/x-cdf" %>
IIS SDK CDF Test
CDF file with ASP
<%
GetChannelItems
%>
<%
'GetChannelItems uses the FileSystem Object
'to access a file on the server which holds
'all the CDF items.
Sub GetChannelItems
On Error Resume Next
Dim objFileSys, prFile, strTitle, strLink,strCategory
'Open FileList.txt to provide dynamic CDF information.
Set objFileSys = Server.CreateObject("Scripting.FileSystemObject")
Set prFile = objFileSys.OpenTextFile(Server.MapPath("FileList.txt"))
If Err.Number <> 0 Then
Exit Sub
End If
'Iterate through the file, dynamically creating CDF item entries.
Do Until prFile.AtEndOfStream
'Get headline.
strTitle = prFile.ReadLine
'Get URL.
strLink = prFile.ReadLine
'Write CDF Item tag back to Browser.
Response.Write("- ")
Response.Write(" " & strTitle & "!!!")
Response.Write(" " & strTitle & "")
Response.Write("
")
Loop
End Sub
%>