Sitemap url with query string asp.net 4.0
<p>i am facing a big problem regarding persisting querystring attach with sitemap url</p>

<p>suppose i have three page</p>

<p>home > page1 > page2</p>

<p>i have one link which redirect  me to page1 with query string like id=1</p>

<p>page1</p>

<p>i know how to attach query string with current site map link</p>

<p>i have another link in page1 for going to page2 like</p>

<p>page1</p>

<p>when i am in page2 and when i hover on the site map link for page2 then it is showing right url with query string but if i hover on the site map link for page1 then page1 link is not showing query string.</p>

<p>this is my problem. i am just not being able to persist the query string with site map link. only query string attach with current link.</p>

<p>so just tell me way out how to persist all the query string for different different site map link. if my question is not clear then please ask me.</p>

<p>i am looking for solution. thanks</p>

<hr>

<p>EDITED Part</p>

<p>i have 3 aspx file one index.aspx,part1.aspx and part2.aspx.
my sitemap control is there in a usercontrol and user control is added in all three aspx page.</p>

<h2>so here is my sitemap file</h2>

<pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" &gt;
&lt;siteMapNode url="~/default.aspx" title="Home"  description="The WebSite's Home Page"&gt; &lt;/siteMapNode&gt;
&lt;siteMapNode url="~/part1.aspx" title="part1"  description="part1"&gt;&lt;/siteMapNode&gt;
&lt;siteMapNode url="~/part2.aspx" title="part2"  description="part2"&gt;&lt;/siteMapNode&gt;
</code></pre>

<p></p>

<p>and the way i attach querystring with sitemap hyperlink using code like</p>

<pre><code>SiteMapNode SmartSiteMapProvider_SiteMapResolve(object sender, SiteMapResolveEventArgs e)
    {
        string QryString = new Uri(HttpContext.Current.Request.Url.AbsoluteUri).Query;
        if ((SiteMap.CurrentNode == null)) return null;
        XmlSiteMapProvider @this = new XmlSiteMapProvider();
        SiteMapNode temp;
        temp = SiteMap.CurrentNode.Clone(true);
        //Uri u = new Uri(e.Context.Request.Url.ToString());
        SiteMapNode tempNode = temp;
        while (tempNode != null)
        {
            if (QryString!="")
            {
                if (tempNode != null)
                {
                    tempNode.Url += QryString;
                }
            }
            tempNode = tempNode.ParentNode;
        }
        return temp;
    }
</code></pre>

<p>actually i want questring should be persisten with sitemap link.
suppose i am in index page and go to part1 page clicking on link from index page like 
part1/a>. the part1 sitemap link is showing query string.
when i go to part2 page clicking on link from part1 page like 
part2/a>. then part2 page sitemap link is showing querystring but when i hover on the part1 sitemap link from part2 page then part1 link is not decorated with query string and this is my concern. when i attach query string with current link then why previous site map link is loosing query string...query string should be intact with all the sitemap link.</p>

<p>please help me. thanks</p>
