Thank you all for replies. I would never imagine putting a counter to an ASP.NET web site to be so difficult. I could not find a solution for the problem although it is a very basic common element of a page.
I think I have to make it more clear.
In my page template I have a UserControl called "RSSreader.ascx". Inside the Rssreader Page_PreRender event it does this
XmlDataDocument feed = new XmlDataDocument();
feed.Load(GetFullUrl(this.RssUrl));
XmlNodeList posts = feed.GetElementsByTagName("item");
...........
and it puts the data to the gridview appropriately
where RssUrl is another page in my project called RssFeed.aspx. RssFeed.aspx has a repeater inside and it turns the database data into XML format. For example if you call this RssFeed page you will see
<rss version="2.0">
<channel>
<title><![CDATA[SomeTEXT]]></title>
<link> SomeTEXT
</link>
<description>SomeTEXT
</description>
</channel>
</rss>
I put the break point to the very top of the Session_Start function and I click a link in my default page:
The cursor comes to my break point and I observe
((System.Web.SessionState.SessionStateModule)(sender))._rqContext.Handler being ASP.RssFeed.aspx
and the
Session ID some value like say "asd432qrfaaq4fdsfadaf"
I push run and the cursor again comes to the same point
((System.Web.SessionState.SessionStateModule)(sender))._rqContext.Handler is again ASP.RssFeed.aspx
and Session ID is some different value.
When I push run again the page I wanted to go becomes available.
So one problem is why the Session_Start is called twice by this RssFeed.aspx page? and another is why do I get different SessionID s each time?
I tried storing something to the Cookie and read it when Session_Start is called again but I cannot find the cookie I placed. It is vanished.
My web.config has this
<sessionState cookieless="false" timeout="60"/>
Thanks