473,385 Members | 1,676 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.

Share data between pages

If I have two pages, page1 and page2. In page1, I have a label control.
After first request for page1, the label control fills with a text, say
"myName", then I pup up the page2. How can I get the label.text of page1
in page2? That is, I want to get data of controls in page1 to page2.
Thanks in advance.

David
Nov 19 '05 #1
5 1147
Session Data
File
DB

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"David Sagenaut" wrote:
If I have two pages, page1 and page2. In page1, I have a label control.
After first request for page1, the label control fills with a text, say
"myName", then I pup up the page2. How can I get the label.text of page1
in page2? That is, I want to get data of controls in page1 to page2.
Thanks in advance.

David

Nov 19 '05 #2
David,

There are a number of ways to do this, but I have a question about the way
you worded your question: What do you mean by pup up (I assume you meant to
type pop up) page 2. Do you mean that the user is pulling up a second window
entirely and you want to send data to it, or do you mean that page 1 is
going to turn into page 2? The way to get information to page 2 is going to
differ based on that clarification.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"David Sagenaut" <sa******@yahoo.com> wrote in message
news:5nP2f.6596$AR1.396@trndny09...
If I have two pages, page1 and page2. In page1, I have a label control.
After first request for page1, the label control fills with a text, say
"myName", then I pup up the page2. How can I get the label.text of page1
in page2? That is, I want to get data of controls in page1 to page2.
Thanks in advance.

David

Nov 19 '05 #3
If need to store only few values, Session is the fastest & easiest method.

If you are talking abt a large transaction that spans across pages, one
solution is to

1) Design a table to hold all the transaction data..
2) At first page create an entry in the table for userid
3) Store the control values in this table from each page before transfering
to next page
4) In each page read the values from table and populate the controls
5) Upon final submit, delete the values [Or periodically delete using a
scheduled job, if the transaction data would help for debugging the app]
"David Sagenaut" wrote:
If I have two pages, page1 and page2. In page1, I have a label control.
After first request for page1, the label control fills with a text, say
"myName", then I pup up the page2. How can I get the label.text of page1
in page2? That is, I want to get data of controls in page1 to page2.
Thanks in advance.

David

Nov 19 '05 #4
Thanks, Justin. The scenario in my mind is that there is link in page1.
After you click the link, the page2 opens. I want to show the text of the
label in page1 on the page2.

David

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:ON**************@TK2MSFTNGP12.phx.gbl...
David,

There are a number of ways to do this, but I have a question about the way
you worded your question: What do you mean by pup up (I assume you meant to type pop up) page 2. Do you mean that the user is pulling up a second window entirely and you want to send data to it, or do you mean that page 1 is
going to turn into page 2? The way to get information to page 2 is going to differ based on that clarification.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"David Sagenaut" <sa******@yahoo.com> wrote in message
news:5nP2f.6596$AR1.396@trndny09...
If I have two pages, page1 and page2. In page1, I have a label control.
After first request for page1, the label control fills with a text, say
"myName", then I pup up the page2. How can I get the label.text of page1 in page2? That is, I want to get data of controls in page1 to page2.
Thanks in advance.

David


Nov 19 '05 #5
David,

There are two different ways to do this then (really there are more, but I
would only consider these three because other methods are overly complex).

One way would be to simply store the text in a session variable and call it
from the second page:

page 1:
Session("MyText") = "Text goes here"

page 2:
Dim MyText As String = Session("MyText").ToString
Another way would be to use Server.Transfer combined with storing the text
in the Context object:

page 1:
Context.Items.Add("MyText", "Text goes here")
Server.Transfer("Page2.aspx")

page 2:
Dim MyText As String = Context.Items.Item("MyText").ToString

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"David Sagenaut" <sa******@yahoo.com> wrote in message
news:YaR2f.6$y05.1@trndny07...
Thanks, Justin. The scenario in my mind is that there is link in page1.
After you click the link, the page2 opens. I want to show the text of the
label in page1 on the page2.

David

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:ON**************@TK2MSFTNGP12.phx.gbl...
David,

There are a number of ways to do this, but I have a question about the
way
you worded your question: What do you mean by pup up (I assume you meant

to
type pop up) page 2. Do you mean that the user is pulling up a second

window
entirely and you want to send data to it, or do you mean that page 1 is
going to turn into page 2? The way to get information to page 2 is going

to
differ based on that clarification.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"David Sagenaut" <sa******@yahoo.com> wrote in message
news:5nP2f.6596$AR1.396@trndny09...
> If I have two pages, page1 and page2. In page1, I have a label
> control.
> After first request for page1, the label control fills with a text, say
> "myName", then I pup up the page2. How can I get the label.text of page1 > in page2? That is, I want to get data of controls in page1 to page2.
> Thanks in advance.
>
> David
>
>



Nov 19 '05 #6

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

Similar topics

3
by: AARON PECORARO | last post by:
I need to split apart my web application into multiple projects to allow it to be distributed in parts, but all of the projects need to work together (ie. they need to share session information)....
3
by: Newbee Adam | last post by:
anyone have any secrets or pearls about vb.net you want to share I was asked by my company to begin teach an introductory VB.Net course 2 day seminar. I had been teaching an sql server 2000...
0
by: inetmug | last post by:
Hello: I am using ASP.NET as our front end. I also have to interface to some legacy systems that use a callback mechanism. The legacy systems use callbacks (via CORBA) to communicate back to...
1
by: Claus Haslauer | last post by:
Hi, firstly, I am new to access03 and server03 Originally, I had written an access 2002 database. Then, we transferred (for another reason) to server 2003. Then, we got access 2003. Then I...
3
by: Jon Paugh | last post by:
Hi, If I have several aspx pages that I want to share across multiple web applications, how would I organize them? Basically, a subset of the pages on a given site will be on several sites....
8
by: Tony Fonager | last post by:
I am currently developing a statistics system in ASP.NET, and need to share information about the customers websites, in this application. (I have simplified my code, to make my project easier to...
3
by: Garth17 | last post by:
I'm trying to figure out a solution for sharing common properties and methods in all me .aspx and .ascx pages. In classic ASP I would use include directives. So far I have made 2 base classes...
3
by: far asl via DotNetMonster.com | last post by:
I have developed my site admin pages some in asp while others are in asp.net. I have problem that i cannot share session variables of both alternatively. Actually i save my userid in session...
5
by: Joe | last post by:
I have an application which runs in a non-secure environment. I also have an application that runs in a secure environment (both on the same machine). Is there any way to share the session data for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.