.NET Framework - page sees session variable as null until refresh

Asked By David
18-Aug-10 01:51 PM
I???m having a problem with a web app that sees a session variable as null
until a page reload.

These are the steps:

1. Web app loads an array of string data into a session variable
2. Go to another page using response.redirect(???mynextpage.aspx???)
3. Return to current page using window.open(???mypage.aspx???,???_self???) call in
javascript file
4. Upon returning, process initially sees session variable as null (this is
not good);
5. refresh page using browser green arrows button, process now sees session
variable as not null, and contains the array (this is what I need)

Other items:
??? Problem only shows up on this one page. Other pages with similar processes
work fine.
??? The problem doesn???t appear to be a postback issue.
??? This only happens on two machines that we???ve tested. One has IE8, one has
IE7.
??? Other PCs with IE7 and IE8, no problems.
??? Looking at the browser internet options, I???m not seeing any real
differences.

thanks for any help pointing me to a resolution.
SessionID
(1)
Abandon
(1)
String data
(1)
  Brian Cryer replied to David
20-Aug-10 06:38 AM
Is the SessionID the same? or does it change? In my experience loss of
session data happens when the SessionID gets lost for some reason. Normally
this is stored in a cookie, and you do not have to worry about it. If you
call Session.Abandon then that will loose your data, but otherwise if
something is changing/resetting the SessionID then that would account for
what you are seeing. So, if you display the SessionID on the page at each
stage in the process does it remain the same or does it get changed at any
point?
--
Brian Cryer
http://www.cryer.co.uk/brian
help
methods ( M1 and M2 ) defined by same class both have locks around the code manipulating data and also assuming the two methods don = 92t operate on same data, then wouldn = 92t it be best if M1 and M2 used different identifiers as their be declared as instance member when only methods within the same instance will share same data, but if methods within different instances will share data, then reference should be declared static? Thus wouldn = 92t a static token reference make multiple so I would assume that we shouldn = 92t try to synchronize different classes accessing same data, but instead we should dedicate a single class D ( its methods would implement locks ) for accessing particular data and any class trying to operate on that piece of data should access data only through D? 4) I realize that we should use private members as lock tokens
do is read old legacy random access files. I used UDTs in vb6, where the string variables had various fixed lengths making up fields concatenated to records. Another thing I want but incredibly slow way) Module Module1 Structure FileRecord Public anInteger As Integer Public aString As String Public anotherString As String Public aSingle As Single End Structure Sub Main() ' create the randome access file Dim hFile hFile, rec, 2) Console.WriteLine("*{0}*", rec.aString) End Sub End Module Personally, I would abandon this method. Like I said in my earlier reply, your going to get lots better Explicit Public FBU As DataBlock1 . . .etc '- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Public Type DataBlock1 ' company master information (FBU) BusName As String * 30 Address1 As String * 30 Address2 As String * 30 Postcode As String * 6 Tel As String * 20 Fax As String * 20 Email As String * 30 RegForGST As
remove double space from string .NET Framework how to replace multiple blank spaces with a single space and how to the iterator in a foreach loop) I want to make all white space in a string one space char only. so if there are two(or more) spaces contiguous, i want works but is probably not the best way to do it. . . . public void TestStringReplace() { List<string> oldList = new List<string> (); List<string> newList = new List<string> (); oldList.Add("this has some white space"); oldList.Add("this also has some white space Debug.Print("old list"); foreach (String s in oldList) { Debug.Print(s); } int lastLength = 0; int thisLength = 0; foreach (String s in oldList) / / i cannot modify s directly since it is the enumerator { StringBuilder sb
PHP library is not very complicated. it is just a bunch of lookup functions and data to support them. It appears to be some kind of open source (*), so if it problems in other languages. Arne = = = = = = = = = = = = = = using System; namespace E { public abstract class BaseNumberWords { protected abstract string GetOne(int v, int gender); protected abstract string GetTeen(int v); protected abstract string GetTens(int v); protected abstract string CombineTenOne(string ten, string one); protected abstract string CombineHundred(string hundred); protected abstract string CombineHundredRest(string hundred, string rest); protected abstract string CombineThousand
Parsing Data Problem . . . .NET Framework Hello, I am trying to parse some data that comes in the following format: One DataEntry contains N Dimensions. In this case N Dim2.Value This is why I am having troubles in parsing . . . This is because the data should be: ROW 1: Dim1.Name + Dim1.Value AND Dim2.Name and Dim2.Value ROW I am doing this on my class constructor. So I would like to save this data on a property or variable on the same class so that the methods of the Collections.Generic; using System.Linq; using System.Text; namespace TestGroupByRowNumber { class Program { class Dimension { public string Name { get; set; } public int Value { get; set; } public Dimension(string name, int value) { Name = name; Value = value; } } class DataEntry { public List<Dimension> Dimensions { get; private set; } public DataEntry(IEnumerable<Dimension> dimensions) { Dimensions = new List<Dimension> (dimensions); } } static void Main(string[] args) { List<DataEntry> entries = new List<DataEntry> { new DataEntry(new Dimension[] { new Dimension("A", 1 a in g) { sb.AppendFormat("; {0}+{1}", a.Name, a.Value); } return sb.ToString(); }); foreach (string str in result) { Console.WriteLine(str); } Console.ReadLine(); } } } The above just emits an IEnumerable<string