scammeh^
03-11-2005, 03:40 PM
Hi! Im trying to use the following code to rotate a 'quote of the day'.
<%
set cr=server.createobject("MSWC.ContentRotator")
response.write(cr.ChooseContent("quote.txt"))
%>
Now because im using a template system, and this code is within the uneditable region, I want this code to work universally on all pages. However, pages within a subdirectory obviously throw up a 'File not Found' error. When I try replacing "quote.txt" with "http://www.mysite.com/quote.txt" it throws up the error: 'Invalid Path Character' 'An invalid character was specified in the Path parameter for the MapPath method.'
Does anyone have any ideas on how I can get a standard URL working for all pages? I could edit each file individually and point it to the quote file, but that would defeat the point of using a template system.
Ta
<%
set cr=server.createobject("MSWC.ContentRotator")
response.write(cr.ChooseContent("quote.txt"))
%>
Now because im using a template system, and this code is within the uneditable region, I want this code to work universally on all pages. However, pages within a subdirectory obviously throw up a 'File not Found' error. When I try replacing "quote.txt" with "http://www.mysite.com/quote.txt" it throws up the error: 'Invalid Path Character' 'An invalid character was specified in the Path parameter for the MapPath method.'
Does anyone have any ideas on how I can get a standard URL working for all pages? I could edit each file individually and point it to the quote file, but that would defeat the point of using a template system.
Ta