473,385 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Session variables and frames

H
I've got the following problem - I need to have an aspx page with two frames, although the question isn't necessarily about the workings of the frames, more session variables... the frames consist of one header (not resizable) and one main (resizable). The source for the "main" page needs to be of the form "WebForm3.aspx?...." with parameters to be determined at runtime. I'm ok with this, I've gone down the route of puttin
src="<%= MainPageToDisplay %>

but what about MainPageToDisplay - the info it needs to access can only be decided in the Page_Load event - so I was wondering which out of a global variable and a session variable are the most reliable to store this information, for instance my dilemma is as such
If I use a global variable, will it be guaranteed to have a unique value in the memory of the web server for each user
If I use a session variable, will it be reliable enough to be guaranteed not to have been "relegated out of the session" by the time the property between the <%= ... %> comes to read it

Thanks for any help, would really appreciate this one clearing up

Thanks.
Nov 18 '05 #1
3 1441
hi Bonj,

You are confusing server side and client side, the Page_Load event occur in
the server side, the objects from the client side (frames, documents,
windows, etc ) do not exist.

If your header page decide the content of the main page you need to
implement that functionality there, you can do so in different ways, if the
page to load & its parameters are decided in the server, then you have to
send this info back to the browser, where a script can read it and set the
correct src of the main frame. the other way to do it is if when you load
the header you can decide what the possible source of main page will be you
can use LinkButtons for example with the correct properties value set.

regarding your doubs about global/session variables:
If I use a global variable, will it be guaranteed to have a unique value in the memory of the web server for each user?
there are not global variables, they need to be either in
Session/Application collections or as a static member of a class used, in
anyway its value will be shared among ALL the users of the application
If I use a session variable, will it be reliable enough to be guaranteed not to have been "relegated out of the session" by the time the property
between the <%= ... %> comes to read >it?

A session variable will exist as long as the session exist, it will never
happen that a variable exist when you start processing the page and timeout
before you finish processing it, the only way to end a session is either you
call Session.Abandon or a page is not requested in a given timeframe.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Bonj" <an*******@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com... Hi
I've got the following problem - I need to have an aspx page with two frames, although the question isn't necessarily about the workings of the
frames, more session variables... the frames consist of one header (not
resizable) and one main (resizable). The source for the "main" page needs to
be of the form "WebForm3.aspx?...." with parameters to be determined at
runtime. I'm ok with this, I've gone down the route of putting src="<%= MainPageToDisplay %>"

but what about MainPageToDisplay - the info it needs to access can only be decided in the Page_Load event - so I was wondering which out of a global
variable and a session variable are the most reliable to store this
information, for instance my dilemma is as such: If I use a global variable, will it be guaranteed to have a unique value in the memory of the web server for each user? If I use a session variable, will it be reliable enough to be guaranteed not to have been "relegated out of the session" by the time the property
between the <%= ... %> comes to read it?
Thanks for any help, would really appreciate this one clearing up!

Thanks.

Nov 18 '05 #2
> regarding your doubs about global/session variables:
If I use a global variable, will it be guaranteed to have a unique value

in the memory of the web server for each user?
there are not global variables, they need to be either in
Session/Application collections or as a static member of a class used, in
anyway its value will be shared among ALL the users of the application


Are the class member declared as static shared among ALL the users of
the application?

As far as I understand objects declared in a session scope shouldn't
be shared among ALL users.

Where can I read more info about it?
What should I do to declare and initialize object once per user and
this object shouldn't be shared among other users?
Nov 18 '05 #3
I'm going with it being undefined - i.e. can't guarantee them to be unique, can't guarantee them to be shared.
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Mimi | last post by:
Hello, I am having trouble using the session vars in PHP 4.3.9 OS: Win XP Prof Web Server IIS (is local and there are no links to other servers from the web pages I work on) Browser: IE 6.0 ...
1
by: Dave Smithz | last post by:
Hi there, I have implemented a login sequence using session variables for a PHP/MySQL DB which I took over development. I read some books and this NG and it seemed straight forward. However the...
2
by: Brad | last post by:
Hi everyone, I've been using ASP on a few different projects over the past year, either using Javascript or VBScript. During that time, I've made use of session variables, but even then, I've...
4
by: A Web Master | last post by:
I am designing a site for a client where I have a frameset and 3 frames (all in ASP). I am creating session variables in the frameset that need to be accessed in the frames. It seams that in...
5
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of...
6
by: Rolf Rosenquist | last post by:
From a html page with frames, I have a link to an asp application. When I let it go to a new browser, all the session variables work as intended. But when I link it into the main frame as target,...
2
by: Bonj | last post by:
H I've got the following problem - I need to have an aspx page with two frames, although the question isn't necessarily about the workings of the frames, more session variables... the frames consist...
2
by: KathyB | last post by:
Hi, I'm doing an asp.net app (first one) and NEED to use frames (so please don't tell me not to!). I'm loading a mainframe.htm with two aspx files (for example: left.aspx, right.asp). QUESTION:...
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
1
by: SteveComplex | last post by:
I'm currently working on a project developing a web application that makes heavy use of 3rd-party controls, popup windows and frames ( not my design I hasten to add ). Some of the pages make use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.