Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Session variables in code behind file
Message
Information générale
Forum:
ASP.NET
Catégorie:
Visual Studio
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01521931
Message ID:
01521978
Vues:
35
This message has been marked as a message which has helped to the initial question of the thread.
I've tried to repro this (migrating from VS2008 to VS2010) and cannot get the error using VS2010 SP1.
The reason for this is simple : the Page Init is *not* now being raised at design time.

Are you using the SP1 version?
There's a lot of chaff in the link you provided. AFAICS the basic problem was that VS2008 did not fire the Init() event at design time but VS2010 did (but I can't check that) ; VS2010 SP1 doesn't.

>The reference to a session variable is in a method called from the OnInit method. I finally figured out how to use the workaround in the post, but I access a session variable in this way in many forms. I was hoping maybe just a change in the web.config would handle this.
>
>Anyway, thanks for the feedback.
>
>
>>
>>Is your reference to session in the OnInit method? Did you try the work around suggested here? I have not encountered it but most likely I do not have any cases of session in the OnInit. Can you put it somewhere else?
>>Timothy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform