If you have a multi-language site and want to submit separate google sitemaps to the webmaster tool, you can't specify the lang query string parameters (it checks only the cookie)
eg. http://mysite.com/CMSPages/GoogleSitemap.aspx?lang=it-IT
I resolved adding this code to page load event... hope this helps
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "text/xml";
googleSitemap.StopProcessing = true;
string lang = String.Empty;
if (Request.QueryString["lang"] != null && !String.IsNullOrEmpty(Request.QueryString["lang"].ToString()))
{
lang = Request.QueryString["lang"].ToString();
}
else
{
//check domain
System.Uri url = Request.Url;
string hostname = url.Host.ToLower();
switch (hostname)
{
case "www.myDomain.it":
lang = "it-IT";
break;
case "www.myDomain.com":
lang = "en-US";
break;
case "www.myDomain.de":
lang = "de-DE";
break;
/* etc */
default:
lang = "en-US";
break;
}
}
googleSitemap.CultureCode = lang;
googleSitemap.ReloadData(true);
}