A Google sitemap is an XML file with a format that Googles’ robots expect to find in a particular folder in you site.
Easiest way to easily create a Google sitemap is from a database, here’s what you need.
Create one database table with four columns; name the columns to match the protocol
(click PDA control for SQL and C# code)
The database table columns are called loc, lastmod, chagefreq and priority; these correspond to the tags required in the file, this is also known as the protocol, see the Webica.net sitemap here.
You need to have a stored procedure that will return the records in the table, each record in the table will hold the URL of page you want to be in the sitemap.
Then you need to create a method that returns a Dataset in one of your project classes.
Let's suppose you name the method (or function) GoogleSiteMap.
The final step would be to place a call to this method in e.g. in the page load event of a page you have specifically for creating the Sitemap, ( the page doesn’t have to do anything except call the method which returns the dataset which is then used to create the Sitemap ( called sitemap.xml here) in the directory of your choice (called xml here)
DataSet ds = new DataSet();
ds = a.GoogleSiteMap();
ds.WriteXml(Server.MapPath("xml\\site.xml"),
XmlWriteMode.IgnoreSchema);
Sample Google SiteMap here
June 16