%@ 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()
{
var objFileSys, prFile, strTitle, strLink
//Open FileList.txt to provide dynamic CDF information.
objFileSys = Server.CreateObject("Scripting.FileSystemObject");
prFile = objFileSys.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("
");
}
}
%>