473,386 Members | 1,799 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,386 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 2122
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.