473,413 Members | 1,794 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,413 software developers and data experts.

Context.Items lost using Server.Transfer

Has anybody encountered a situation like this: Inside Page1.aspx I'm
using Server.Transfer("Page2.aspx") to get to Page2.aspx. I save few
values in Context.Items which I try to restore in Page2. Most of the
time everything works fine, but from time to time the Context items
are completely lost by the time they get to Page2. It happens only in
production so my abilities to debug this are very limited. Are there
any known circumstances that this can occur?

Any help is greatly appreciated,
L.J.
Nov 18 '05 #1
2 2123
Your answer lies in the overloaded methods of the Server object's Transfer
method.
Two of them if I recall; the solution lies in using the other one.
--
Peter O'Reilly
Nov 18 '05 #2
Thanks for the reply.
There is and overload to Server.Transfer where you can pass the second
parameter which is bool preserveForm. The documentation states that
passing false would clear Form and QueryString collections. This is the
default value if you omit the second parameter. I guess I can use
preserveForm=true, but I don't see how's that relevant to the
Context.Items collections. Context object is supposed to live only
during the execution of current request. Am I missing something?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

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

Similar topics

1
by: | last post by:
When passing values from one page to another using context.items collection & server.transfer, how secure is this data? This is using the notion that you add an item to the context.items...
0
by: Srini | last post by:
I am implementing Front Controller in ASP.net as outlined in Microsoft documentation titled "Implementing Front Controller in ASP.NET Using HTTPHandler"...
2
by: LJ Jurkovic | last post by:
Has anybody encountered a situation like this: Inside Page1.aspx I'm using Server.Transfer("Page2.aspx") to get to Page2.aspx. I save few values in Context.Items which I try to restore in Page2....
2
by: Rea Peleg | last post by:
Hi eb I am adding in webForm1.aspx some item to the context items collection in order to extract it in the next aspx page: In webForm1.aspx - c# code behind - i do:...
2
by: dave | last post by:
This little problem is driving me nuts!! On my webform page I create 2 variables.. Protected p_dml As String = "I" Public Const mwv_id As Integer = 0 ' originally had mwv_id as Protected
6
by: Roman | last post by:
Which is better when passing values between forms?
8
by: Steph | last post by:
Hi, Is it better to use the URL method to send informations to a page, or to use the context method ? Thanks.
4
by: nicholas | last post by:
I'm using context to transfer variables from 1 page to another. But, with more than 2 pages it fails. Ex: page1.aspx: Context.Items.Add("customername", customername.text)...
1
by: Hugo Flores | last post by:
Hi, I'm trying to pass information between pages. I'm trying to avoid using QueryString and Session variables. I saw somewhere that I could use contxt.Items.Add (combined with Server.Transfer)...
4
by: Hugo Flores | last post by:
Often people post questions about how did they loose their context between pages, and the more common cause is that they don't store the context on the viewstate upon postbacks. Mine is the other...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.