CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2005
    Location
    Israel
    Posts
    1,475

    simple Session question

    I have two aspx pages in two different web projects.
    From one aspx I want to redirect to the other web page, passing session variables.
    The second aspx does not recieve the variables, they are equal to null.

    When doing the above in the same web project (both pages in the same project) it works.

    What am I doing wrong?

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: simple Session question

    I guess it is because the ASPX pages belong to two different applications. Session objects are valid within the current AppDomain for that particular AppDomain.

    Cann't you pass the Session variables using a query string to the second ASPX page and save them there?

  3. #3
    Join Date
    Feb 2005
    Location
    Israel
    Posts
    1,475

    Re: simple Session question

    I tried QueryString, and it worked.
    The thing is, that I want to pass lots of parameters, some of them I wish to be hidden from users. QueryString is not so suitable for this. I would prefer to use Session. There is no possible way to do it?

  4. #4
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: simple Session question

    As I said Session Variables belong to one particular application and as your second ASPX page belongs to a totally different application, it might be little bit difficult to achieve that.

  5. #5
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: simple Session question

    The way easiest method of doing is this as already suggested by the previous poster - querystrings.

    Other alternatives exists (such as for example using HttpWebRequest to send forms from one application to the other containing the data etc) however they'll all take some development to implement.

  6. #6
    Join Date
    Feb 2005
    Location
    Israel
    Posts
    1,475

    Re: simple Session question

    Ok, thank you both for your input.
    I will stick to querystrings at the moment.

  7. #7
    Join Date
    Dec 2005
    Location
    Waterloo ON
    Posts
    545

    Re: simple Session question

    Maybe you could try another way using database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured