I have a feeling it's just a configuration problem,<BR>but i have a page containing a form that posts back to itself when submitted. Within the page_load() function , let's say i do this:<BR><BR>--before--<BR>Session["foo"] = "hello, world!";<BR>--after--<BR><BR>at the initial loading of the page, at "--before", of course Session["foo"] is going to be null, and at "--after--",<BR>Session["foo"] is set to "hello,world!", at this point everything is nice and dandy<BR><BR>then i click on submit the first time and it posts back to the same page, annoyingly enough, at "--before--", Session["foo"] is null!!<BR><BR>then i click on submit the SECOND time, at "--before", Session["foo"] contains "hello, world!", and it's fine from now on (ie third, forth time etc)<BR><BR><BR>so it's weird that it doesn't reembmer anything the first time and functions normally after that<BR><BR>can anyone see the cause of the problem?<BR>Session is running inproc if that helps<BR>and i've already set EnableSessionState = true, obviously, or else it woudln't even remember anything at the 2nd, 3rd etc tries<BR><BR>please help<BR>thanx<BR><BR>Hi ! I tried it and it's working fine here. Here is my code :<BR>(it's vb not c# and i'm unsing chode behind)<BR><BR>Code for the page test.aspx :<BR><BR><%@ Page Language="vb" AutoEventWireup="false" Codebehind="test.aspx.vb" Inherits="Web_CodeLibrary.test"%><BR><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><BR><HTML><BR> <HEAD><BR> <title>test</title><BR> <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0"><BR> <meta name="CODE_LANGUAGE" content="Visual Basic 7.0"><BR> <meta name="vs_defaultClientScript" content="JavaScript"><BR> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"><BR> </HEAD><BR> <body MS_POSITIONING="GridLayout"><BR> <form id="Form1" method="post" runat="server"><BR> <asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 21px; POSITION: absolute; TOP: 19px" runat="server">Label</asp:Label><BR> <asp:Label id="Label2" style="Z-INDEX: 102; LEFT: 23px; POSITION: absolute; TOP: 56px" runat="server">Label</asp:Label><BR> <asp:Button id="Button1" style="Z-INDEX: 103; LEFT: 21px; POSITION: absolute; TOP: 88px" runat="server" Text="Button"></asp:Button><BR> </form><BR> </body><BR></HTML><BR><BR><BR><BR>Code for the page test.aspx.vb :<BR><BR><BR>Public Class test<BR> Inherits System.Web.UI.Page<BR> Protected WithEvents Label2 As System.Web.UI.WebControls.Label<BR> Protected WithEvents Button1 As System.Web.UI.WebControls.Button<BR> Protected WithEvents Label1 As System.Web.UI.WebControls.Label<BR><BR>#Region " Web Form Designer Generated Code "<BR><BR> 'This call is required by the Web Form Designer.<BR> <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()<BR><BR> End Sub<BR><BR> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init<BR> 'CODEGEN: This method call is required by the Web Form Designer<BR> 'Do not modify it using the code editor.<BR> InitializeComponent()<BR> End Sub<BR><BR>#End Region<BR><BR> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<BR> Label1.Text = "On Load Value: " & Session("foo") & "<BR><BR>"<BR> if len(Session("foo")) = 0 then<BR> Session("foo") = "hello, world!"<BR> end if<BR> End Sub<BR><BR> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<BR> Label2.text = "On Submit Value : " & Session("foo") & "<BR><BR>"<BR> End Sub<BR>End Class<BR><BR><BR>Good luckExactly! i can create a different project and this particular session issue can be resolved! seems so simple<BR><BR>it just wouldnt' work with this project im working on.<BR><BR>i guess it could be soemthing else in my project that caused it..<BR><BR>thanks a lot for your effortMaybe something in your web.config?my web.config was the same<BR><BR>anyways here it is,<BR><BR><?xml version="1.0" encoding="utf-8"?><BR><configuration><BR> <BR> <system.web><BR><BR> <!-- DYNAMIC DEBUG COMPILATION<BR> Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to<BR> false will improve runtime performance of this application. <BR> Set compilation debug="true" to insert debugging symbols (.pdb information)<BR> into the compiled page. Because this creates a larger file that executes<BR> more slowly, you should set this value to true only when debugging and to<BR> false at all other times. For more information, refer to the documentation about<BR> debugging ASP .NET files.<BR> --><BR> <compilation defaultLanguage="c#" debug="true"><assemblies><add assembly="CrystalDecisions.CrystalReports.Engine, Version=9.2.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportSource, Version=9.2.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Shared, Version=9.2.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Web, Version=9.2.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=9.2.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies></compilation><BR><BR> <!-- CUSTOM ERROR MESSAGES<BR> Set customError mode values to control the display of user-friendly <BR> error messages to users instead of error details (including a stack trace):<BR><BR> "On" Always display custom (friendly) messages <BR> "Off" Always display detailed ASP.NET error information.<BR> "RemoteOnly" Display custom (friendly) messages only to users not running <BR> on the local Web server. This setting is recommended for security purposes, so <BR> that you do not display application detail information to remote clients.<BR> --><BR> <customErrors mode="RemoteOnly"/> <BR><BR> <!-- AUTHENTICATION <BR> This section sets the authentication policies of the application. Possible modes are "Windows", "Forms", <BR> "Passport" and "None"<BR> --><BR> <authentication mode="Windows"/> <BR><BR> <!-- APPLICATION-LEVEL TRACE LOGGING<BR> Application-level tracing enables trace log output for every page within an application. <BR> Set trace enabled="true" to enable application trace logging. If pageOutput="true", the<BR> trace information will be displayed at the bottom of each page. Otherwise, you can view the <BR> application trace log by browsing the "trace.axd" page from your web application<BR> root. <BR> --><BR> <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/><BR><BR> <!-- SESSION STATE SETTINGS<BR> By default ASP .NET uses cookies to identify which requests belong to a particular session. <BR> If cookies are not available, a session can be tracked by adding a session identifier to the URL. <BR> To disable cookies, set sessionState cookieless="true".<BR> --><BR> <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20"/><BR><BR> <!-- GLOBALIZATION<BR> This section sets the globalization settings of the application. <BR> --><BR> <globalization requestEncoding="utf-8" responseEncoding="utf-8"/><BR> <BR> </system.web><BR><BR></configuration><BR><BR><BR>anyhow, have you guys tried the Single-File Web Forms Pages instead of building a whole project in VS.net?<BR>I don't know.. If it's working in another project, you could recreate a project and copy all your stuff in there. That's not really good but if it's working.. :<BR><BR>And i didn't tried to make a project without vs.net, why? It's just faster with vs.net, you have the spell checker, the "completion", it's generating some code for you... You just have to know what you're doing and it's fine.. 
