I sended this reply to my first issue a few days ago... please help!!!
------------------------
correct,
but when I am using this session in another ASP.net project on the SAME
server , the session is empty
It seems sessions are lost when you redirect to another page on the same
server but within another project in the SAME solution.
Sounds strange to me, I always thought session were kept on the server,
perhaps I could try to save my sessions in an sql database, but is it
possible for objects like an instance of a class?
Hope someone can help me out!
Best regards
Nick Wouters
Belgium newbie
"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:3CBCBB41-79F1-4D9C-BE8F-EFDD20D62A6C@dotnet.itags.org.microsoft.com...
> Have your class write it somewhere or put the object into the session data
> after it's filled.
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com
>
> "Nick Wouters" wrote:
>> Please Help, I am a starting ASP.NET programmer...
>>
>> I have created a class user.vb and compiled it to dll
>> I can fill the records from this database into the properties and
>> collections.
>>
>> My problem is I want to transfer all the information in this object to
>> another aspx-page...
>>
>> How can I do this?
>>
>> Thanks in advance
>>
>> Nick Wouters
>> Newbie
>>
>>
>Session variables are only valid for one web application. So if your
directory structure looked like this:
c:\wwwroot\InetPub
--- Application 1
bin
---- Application 2
bin
A session in Application 1 can only be used in the Application 1 web
app, and Application 2 (regardless of whether it is part of the same
solution) cannot see it. If you want to share Session data, you will
either have to persist the data in some location, or you could send the
data via a QueryString variable between directories:
(In Application 1):
<a
href="http://localhost/Application2/GetVariable.aspx?SessionVar=hello">Send</a
(In Application 2, this code would be in a file named
GetVariable.aspx):
Dim App1SessionVariable As String = Request.QueryString("SessionVar")
There may be other methods as well. Hope that helps.
Scott
0 comments:
Post a Comment