Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2007, 02:43 AM
Authorized User
 
Join Date: Mar 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default access data from another page

i have two .aspx pages called first.aspx and second.aspx
There is one textbox on first.aspx and one textbox on second.aspx page.

I want to access the value of textbox on first page,
in the textbox on second page.
How can i do this???

please help me..

 
Old March 17th, 2007, 12:51 PM
Authorized User
 
Join Date: Feb 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

put the textbox.text into the session, at the first page.
retrieve that value from session in the second page. that is one method.

Aritra Mukherjee,
CS-4th Year,
MSIT-Kolkata.
 
Old March 18th, 2007, 04:08 AM
Authorized User
 
Join Date: Apr 2006
Posts: 79
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to anujrathi Send a message via MSN to anujrathi Send a message via Yahoo to anujrathi
Default

hi,
U can use the PostBackUrl in first page & to find the value in second page from first page, use IsCrossPagePostBack properties...
 
Old March 26th, 2007, 08:03 AM
Authorized User
 
Join Date: Mar 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for giving answer......
I have tried for that method but i get error and
im not much familliar with asp.net.
can u please give me the code sample for the same?

Bye...:)

 
Old March 26th, 2007, 08:05 AM
Authorized User
 
Join Date: Mar 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for giving answer....
can u please give the code sample for the same method...??
bye...
:)

 
Old March 26th, 2007, 08:18 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

First, IsCrossPagePostBack is a .NET 2.0 feature and does not work in 1.X.

To place data in session you do something like:

Session.Add("value", textBox1.Text);
(Use this method on Page 1)

to reference the session value

Convert.ToString(Session["value"]);
(Use this method on page 2)

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access: Data Access Page sevp95 Access VBA 0 July 14th, 2008 11:07 AM
Data Access Page Problem please help! jdbash1 Access 0 June 5th, 2006 02:16 PM
Data access page Fntmn Javascript How-To 1 March 21st, 2006 07:15 AM
Data Access Page Teqlump Access 9 November 1st, 2004 11:36 PM
Data access page access problem :) kev_79 Access 0 September 4th, 2003 04:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.