<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim path, index, indexPath, currentPage, newPageContent, pageContent newPageContent = Request.QueryString("pageContent") ' Set path = Nothing ' path = "bdresources" Set index = Nothing index = "1stdirect.html" indexPath = "" '<-- Change this variable to the current page NOTE: see if there is a way to call the current page automatically! --> currentPage= "bdresources.asp" if newPageContent = "" then newPageContent = indexPath & index End If %>
upper left corner upper right corner
bus (8K) header2 (18K) email (1K) Sign up for our newsletter!
Home
About Us
Services
Clients
Case Studies
Articles & Publications
Business Dev. Resources
Newsletter Archives
FAQs
Contact
[an error occurred while processing this directive] <% Dim i, count, bg count= 1 Set objFso = CreateObject("Scripting.FileSystemObject") Set objFiles = objFso.GetFolder(Server.MapPath(path)) Set fileList = objFiles.Files For Each i in fileList pageContent = i.name if (count mod 2) = 1 then bg = "#FFFFFF" 'Main Color else bg = "#CCCCCC" 'Alternate Color end if %>> <% Next 'objItem ' All done! Kill off our object variables. Set i = Nothing %>
<%pageContent = ""&PropCase(pageContent)&"" count = count + 1%>
Business Development Resources
<% ''' the following string is an alternative to including a file newPageContent = "/" & path & "/" & newPageContent server.execute(newPageContent) function ReadFromFile (Name) Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Const fsoForReading = 1 Dim objTextStream Set objTextStream = objFSO.OpenTextFile(Server.MapPath(Name), fsoForReading) ReadFromFile=objTextStream.ReadAll end function %>
" ' ##### Error message that will be displayed if not items etc ErrorMessage = "Error has occured while trying to process " &URLToRSS & "
Please contact web-master" ' ================================================ Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") xmlHttp.Open "GET", URLToRSS, false xmlHttp.Send() RSSXML = xmlHttp.ResponseText Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0") xmlDOM.async = False xmlDOM.validateOnParse = False xmlDom.resolveExternals = False If not xmlDOM.LoadXml(RSSXML) Then ErrorMessage = "Can not load XML:" & vbCRLF & xmlDOM.parseError.reason & vbCRLF & ErrorMessage End If Set xmlHttp = Nothing ' clear HTTP object Set RSSItems = xmlDOM.getElementsByTagName("item") ' collect all "items" from downloaded RSS RSSItemsCount = RSSItems.Length-1 ' if not .. entries, then try to get .. if RSSItemsCount = -1 Then Set RSSItems = xmlDOM.getElementsByTagName("entry") ' collect all "entry" (atom format) from downloaded RSS RSSItemsCount = RSSItems.Length-1 End If Set xmlDOM = Nothing ' clear XML ' writing Header if RSSItemsCount > 0 then Response.Write MainTemplateHeader End If j = -1 For i = 0 To RSSItemsCount Set RSSItem = RSSItems.Item(i) ' fix for the issue when a description from a previous item ' is used if current item description is empty provided by George Sexton RSSdescription=" " RSSCommentsLink=" " for each child in RSSItem.childNodes Select case lcase(child.nodeName) case "title" RSStitle = child.text case "link" If child.Attributes.length>0 Then RSSLink = child.GetAttribute("href") if (RSSLink <> "") Then if child.GetAttribute("rel") <> "alternate" Then RSSLink = "" End If End If End If ' if has attributes If RSSLink = "" Then RSSlink = child.text End If case "description" RSSdescription = child.text case "content" ' atom format RSSdescription = child.text case "published"' atom format RSSDate = child.text case "pubdate" RSSDate = child.text case "comments" RSSCommentsLink = child.text case "category" Set CategoryItems = RSSItem.getElementsByTagName("category") RSSCategory = "" for each categoryitem in CategoryItems if RSSCategory <> "" Then RSSCategory = RSSCategory & ", " End If RSSCategory = RSSCategory & categoryitem.text Next End Select next ' now check filter If (InStr(RSSTitle,Keyword1)>0) or (InStr(RSSTitle,Keyword2)>0) or (InStr(RSSDescription,Keyword1)>0) or (InStr(RSSDescription,Keyword2)>0) then j = J+1 if J 0 then Response.Write MainTemplateFooter else Response.Write ErrorMessage End If ' Response.End ' uncomment this for use in on-the-fly output %>

CNN Business News <% Response.Expires = -1 ' =========== RSS2HTML.ASP for ASP/ASP.NET ========== ' copyright 2005-2008 (c) www.Bytescout.com ' version 1.27, 16 August 2008 ' =========== configuration ===================== ' ##### URL to RSS Feed to display ######### URLToRSS = "http://rss.cnn.com/rss/money_news_companies.rss" ' ##### max number of displayed items ##### MaxNumberOfItems = 3 ' ##### Main template constants MainTemplateHeader = "" MainTemplateFooter = "
" ' ##### ' ###################################### Keyword1 = "" ' Keyword1 = "" - set non-empty keyword value to filter by this keyword Keyword2 = "" ' Keyword1 = "" - set non-empty keyword value to filter by this 2nd keyword too ' ################################# ' ##### Item template. ' ##### {LINK} will be replaced with item link ' ##### {TITLE} will be replaced with item title ' ##### {DESCRIPTION} will be replaced with item description ' ##### {DATE} will be replaced with item date and time ' ##### {COMMENTSLINK} will be replaced with link to comments (if you use RSS feed from blog) ' ##### {CATEGORY} will be replaced with item category ItemTemplate = "
{DATE}
{CATEGORY}
{TITLE}
{DESCRIPTION}

lower left corner lower right corner