%@ LANGUAGE="JSCRIPT" %>
<% 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 that holds
// all the latest news headlines.
function GetChannelItems()
{
// Open FileList.txt to provide dynamic CDF information
fso = Server.CreateObject("Scripting.FileSystemObject");
prFile = fso.OpenTextFile(Server.MapPath("FileList.txt"));
// Iterate through the file, dynamically creating CDF
// item entries
while(!prFile.AtEndOfStream)
{
// Get headline for item
strTitle = prFile.ReadLine();
// Get URL of item
strLink = prFile.ReadLine();
// Write CDF Item Tag
Response.Write("- ");
Response.Write(" " + strTitle + "!!!");
Response.Write(" " + strTitle + "");
Response.Write("
");
}
}
%>