Updated web.Sitemap to google sitemap

by Bobbi Perreault 22. November 2008 05:08
Share on Facebook

Today, I updated the code for this blog entry:  Web Sitemap to Google Sitemap Tool

 I needed to regenerate a Google sitemap for my store, http://store.ezburn.com, and couldn't find my source code.  That's not unusual.  One very good reason to keep these things in a blog entry, actually!  So, I went to my blog, typed in "sitemap" and found the entry where I describe how to do this.  I could not understand a word I was saying.  haha.  Anyway, I downloaded the code, opened the project, adjusted the connection strings in web.config,  set Default.aspx as my startup page, and ran it in the debugger.

 First of all, I didn't realize that the links to generate the web.sitemap and the google.sitemap were right there in the Default.aspx page.  So I moved those to the Top of the web.sitemap display.  Next, I clicked the link to generate my web.sitemap from my ecommerce database.  That didn't work because my stored procedure expects a parameter and the code I downloaded didn't pass a parameter to it.  So I fixed that.

Next, when I clicked the link on Default.aspx to generate my web.sitemap from my store's product and category lists - I got a web.sitemap.  When I pushed the back button to load that web.sitemap - I got an error.  Bad characters in the description were the problem this time so I fixed up my SQL and ran it again.  Here's the SQL I ended up with, in case it helps.  I had to just remove the html tags from the description.  Could be done better but as always, I'm in a big time crunch.

The updated code is available here:  http://faxt.com/code/websitemaptogooglesitemap.zip

 

Tags:

Comments are closed

 

RSS Feed FriendFeed