Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 April 3rd, 2009, 05:57 PM
Authorized User
 
Join Date: Mar 2009
Posts: 20
Thanks: 7
Thanked 0 Times in 0 Posts
Default Passing data between pages

Hi,

I am trying to find which technique is followed in TBH to pass data between pages(Content Pages). Is there any popular technique that we can follow to pass data from one form to another form except the old querystring, sessions, cookies etc. And another question I wanted to ask is how do we preserve form data between postbacks? I could not recognize if TBH is following any techniques while going through the book.
Any help or any resource links are greatly appreciated.
Thank you!
 
Old April 3rd, 2009, 07:15 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Quote:
popular technique that we can follow to pass data from one form to another form
TBH uses the querystring mostly. Tried, true, and easy. Not secure, but then again not everything needs to be secure.

The other most common way is to cross-post or use Server.Transfer, then either read the properties and/or control values from the previous page, or read the Form collection directly.

While you can use a state-handling mechanism like Session, Cookies, Context, etc. to pass values between pages, that would be ridonkulous. Like hiring a semi to mail a letter.

Quote:
And another question I wanted to ask is how do we preserve form data between postbacks?
Umm... is it... ViewState? Do I win a prize? LOL, just kidding.

By the way -- are you studying for a test or something?
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old April 3rd, 2009, 10:39 PM
Authorized User
 
Join Date: Mar 2009
Posts: 20
Thanks: 7
Thanked 0 Times in 0 Posts
Default

Hi,

Thanks for the responses. I actually know .Net 1.1 but not good at 2.0 so I started studying the TBH book and trying to compare 1.1 and 2.0 and I liked this book very much.
I was wondering if we can use PreviousPage property if we are using master - content pages? Can a content page use PreviousPage property so it can read the values of another content page? anyways thanks for the helpful answers.
 
Old April 3rd, 2009, 10:56 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Quote:
Can a content page use PreviousPage property so it can read the values of another content page?
Sure, no problem there. Once the master page control is consumed by the content page, they are no different than any other page as far as the runtime is concerned.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
The Following User Says Thank You to Lee Dumond For This Useful Post:
Jyothi_23 (April 3rd, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
How does one display data in pages? crabjoe Classic ASP Basics 2 November 29th, 2007 11:00 PM
passing data between pages johnhardy BOOK: Beginning ASP 3.0 1 October 18th, 2003 04:29 AM
Passing parameters between pages burdickdave ASP.NET 1.x and 2.0 Application Design 3 July 7th, 2003 02:11 PM





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