Hi,
Even tought you can achive your goal with one way or another, here is what and how i think you should use sessions and queryStrings.
1/ QuerySTrings
-I always use queryString to redirect to details pages.
In your case childWindow.aspx?id=5.
As long the data you pass is not important (no password and other critical data)
=> thats why you must have an id column in your database tables, so you can get your data with your unique ids.
2/Session:
Session can make the code very hard to mantain, so its better to avoid them and only use them when needed.
3/ViewStates
View states are basicaly sessions but not in all of the application level but in the page level.
They are very usefull in postbacks.
Here is an exemple :
private MyClass ClassObject
{
get { return ViewState["myClassObj"] as MyClass ; }
set { ViewState["myClassObj"] = value; }
}
You can imagine this as an init, when a post back is performed, you can always access your ClassObject because we saved it.
PS : Pay attention, with this method any user can change the value in the url and access data they dont have the right to, so :
-You should implement a role management system to avoid this.
-Probably wise to encrypt/decrypt your queryStrings.
Hope it helps.