View Single Post
  #6 (permalink)  
Old December 7th, 2009, 09:18 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Adam,

To make your code more easy to understand, you can get rid of all the script blocks. <% and %> denote a server side block. You don't have to open and close one on each line. E.g.:

<%Response.write("<?xml version=""1.0"" encoding=""utf-8""?>")%>
<%Response.write("<?xml-stylesheet type=""text/css"" href=""css/rss.css"" ?>")%>

Can be rewritten as:

<%
Response.write("<?xml version=""1.0"" encoding=""utf-8""?>")
Response.write("<?xml-stylesheet type=""text/css"" href=""css/rss.css"" ?>")
%>

Your entire code probably only needs a single script block.

You may need to tweak your code here and there. For example:

comment_ind.asp?thread

only makes sense within a web site where comment_ind.asp is used to point relatively to another page. RSS is disconnected from your site, so you need something like:

http://www.yourdoamin.com/comment_ind.asp?thread

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote