By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

Access Value of a control on another page

P: n/a
RSH
I have a situation where I have a page called "HiddenFrame.aspx" that
contains a public property exposing the value of a textbox called "TextBox1"
that is in a hiddenframe.

Loaded in the main frame is a page called "Page1.aspx" in which from the
code behind I need to set the value of "TextBox1" which will be persistent
following the initial setting.

How can I set the value of that textbox in the hiddenframe?

Will I need to do it from the clientside?

Thanks Ron
Apr 11 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
This doesn't really address the problem you raise, but I wonder if you had
considered creating your own server side object in which to store values
like these. I am assuming that these values that you want to access
represent some state information and that that state information is saying
something about an object that your application is modelling.

Life becomes much easier when you do this, because everything is in the
right place. The client (browser) contains only presentation data: the
server (ASP.NET server-side) holds all Session or Application-related data:
the business data goes into the business layer (perhaps on an application
server): and data access data in the data layer (again, perhaps on a
differenct server altogether).

Once you've split things up in this way, it is easy to access any datum,
because it will be located exactly where you left it. It also greatly
simplifies the markup on the client side because the client side only
concerns itself with presenting the data; not storing or maintaining it.

Just my 2c. YMMV.
Peter
"RSH" <wa*************@yahoo.comwrote in message
news:OS**************@TK2MSFTNGP06.phx.gbl...
>I have a situation where I have a page called "HiddenFrame.aspx" that
contains a public property exposing the value of a textbox called
"TextBox1" that is in a hiddenframe.

Loaded in the main frame is a page called "Page1.aspx" in which from the
code behind I need to set the value of "TextBox1" which will be
persistent following the initial setting.

How can I set the value of that textbox in the hiddenframe?

Will I need to do it from the clientside?

Thanks Ron

Apr 11 '07 #2

P: n/a
RSH
Peter,

Thanks for your reply.

Normally I would implement what you are saying but my issue is really trying
to get around a particular problem with the potential of crossed up
sessions.

In the new series of browsers they introduced these damn tabs. I have a
situation where multiple users are using the same computer, and they are
using my web application in which they are authenticating through. The
situation has arisen on more than one occassion in which a user has logged
in and has a current session. A second user opens a new tab or window and
logs in, does what they are supposed to do then closes out. Now because
user 2 logged in in the same instance of the browser a second unique session
is NOT created it simply uses the SessionID of the first user and overwrites
all of the session information from the first user. Once the second user
closes the window, you would think their session would terminate but in
actuality the session remains open because the first user is still logged
in...worse yet the first user comes back and starts entering data thinking
they are working with their session, but since user2 logged in user1 is
actually using user 2s session.

So with that being said I was trying to figure out a way to persist the user
id in a hidden frame and then on every page load i can compare the session
variable that contains their user name against the persisted username and if
they dont match they are logged out, forcing them to re login and set the
session vars up correctly.

Ron

"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:O0**************@TK2MSFTNGP06.phx.gbl...
This doesn't really address the problem you raise, but I wonder if you had
considered creating your own server side object in which to store values
like these. I am assuming that these values that you want to access
represent some state information and that that state information is saying
something about an object that your application is modelling.

Life becomes much easier when you do this, because everything is in the
right place. The client (browser) contains only presentation data: the
server (ASP.NET server-side) holds all Session or Application-related
data: the business data goes into the business layer (perhaps on an
application server): and data access data in the data layer (again,
perhaps on a differenct server altogether).

Once you've split things up in this way, it is easy to access any datum,
because it will be located exactly where you left it. It also greatly
simplifies the markup on the client side because the client side only
concerns itself with presenting the data; not storing or maintaining it.

Just my 2c. YMMV.
Peter
"RSH" <wa*************@yahoo.comwrote in message
news:OS**************@TK2MSFTNGP06.phx.gbl...
>>I have a situation where I have a page called "HiddenFrame.aspx" that
contains a public property exposing the value of a textbox called
"TextBox1" that is in a hiddenframe.

Loaded in the main frame is a page called "Page1.aspx" in which from the
code behind I need to set the value of "TextBox1" which will be
persistent following the initial setting.

How can I set the value of that textbox in the hiddenframe?

Will I need to do it from the clientside?

Thanks Ron


Apr 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.