protected void Page_Load(object sender, EventArgs e) { PostAroundServiceClient client = new PostAroundServiceClient(); int siteMapsCount = client.CreateXmlSiteMap(); DateTime lastpostDate = client.GetDateOfLastPost("", "", -1); client.Close(); List<int> lstIndexes = new List<int>(); for (int i = 0; i <= siteMapsCount; i++) { lstIndexes.Add(i); } CreateSiteMapIndex(lstIndexes, lastpostDate); }