Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 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 September 25th, 2015, 04:10 AM
Authorized User
 
Join Date: Aug 2011
Posts: 44
Thanks: 14
Thanked 0 Times in 0 Posts
Default Overcome the stateless nature of Http

Hello Imar,

I’m studying the chapters on Data controls (13- 15) but, in the end, I’m not sure how to overcome the stateless nature of Http.

Let’s suppose I have a WebForm (InsertContract.aspx) to insert the data of new contracts.
After having inserted a few data (contract code, date of start and so on) I realize that I need to pick the Id of the holder of the contract. In order to do that, I need to go to another WebForm (People.aspx) and pick a row from a GridView of people loaded from the Db. Once chosen the right person, I would like to go back to InsertContract.aspx with the Id of the chosen person and find the data already inserted still there.

In a desktop application this is common practice. But I could do that in Asp.Net ? Cache ? Session state ?
Could you point us to a working implementation of the kind ?

Thank you

Antonius
 
Old September 28th, 2015, 03:21 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can redirect to a new page, pick the item thee, and then return its ID to the previous page in the query string. You either lose your data when you redirect, or you need to save it somewhere (in the database for example) temporarily and populate it again when you return.

You could also create a dialog (as an overlay) that shows the new page in an iframe and then communicate the ID back through JavaScript. You can do something similar using AJAX.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP GET and HTTP POST tedr BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 0 April 12th, 2010 05:08 PM
stateless bean iralala EJB 0 September 24th, 2008 10:55 PM
How to Overcome this?? mp3pm VB Databases Basics 3 August 24th, 2006 09:39 AM
nature photography site montana1 Beginning PHP 1 July 16th, 2006 06:41 AM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM





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