how/where to store the page numbers when navigating to other page / portal
<p>I'm using an usercontrol (*.ascx) in a CMS system C#.NET </p>

<p>I've got a Gridview which displays address. You hav a link on the line items and you can click on the items (link) which navigates to other page with querystring info and displays the detail information.  When the user clicks on cancel/back it returns the the overview page. Both are separate programs.</p>

<p>When the user clicks on Next, Next, Next e.g. page 7 is displayed.  So clicking on an "adres link" on Page 7 will open a new page and when the user comes back it should display page 7 back again. </p>

<p>I was keeping the page numbers in a session. so when the user comes back it reads the pagenumber from the session. This works fine. But the issue is this module is used other placess too, and also in other portals (which uses the same module)</p>

<p>So when have clicked next next etc and you are on page 7 and then you open another portal or other Porgram which have the same module, it displays page 7. Because it reads the Session variable and sometiems it gives a dump because page 7 doesn't exist, because no much records.</p>

<p>Viewstate fix this issue, but everytime after clicking the adres item and coming back it displays page 1, which is not what I want.</p>

<p>As I said, I use the same module in other pages and other portals (same program with different settings CMS -system)... So <strong>where</strong> and <strong>how</strong> do I need to store the pagenumbers so it doesn't have conflict with other pages and other portals? </p>

<p>ViewState["page"] = 7   -> starts on page 1 always when you come back</p>

<p>Session["page"] = 7     -> page number is shared....</p>
