Saturday, March 24, 2012

Passing variables between projects?

Hey all,

Is it possible to pass session variables between pages in separate
projects?

For example:
inetpub\thisproject\blah.aspx
has a session variable and response.redirects the user to
inetpub\anotherproject\test.aspx

When I try to access the session variable after the redirection, it
doesn't exist? I'm assuming this is because the two pages have separate
bin files? How can I pass a variable between these two?

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***you can share session , if you can build both projects in to a single
web application

MSDN article explaning "Make Multiple Visual Studio .NET Projects
Participate in the Same Web Application"

http://support.microsoft.com/defaul...;en-us;307467#5
No, session data is not shared between separate applications.
You might look at other ways of passing data between applications, such as a
common database or passing values via post or querystring.

--
I hope this helps,
Steve C. Orr
MCSD, MVP
http://Steve.Orr.net

"Roy" wrote:

> Hey all,
> Is it possible to pass session variables between pages in separate
> projects?
> For example:
> inetpub\thisproject\blah.aspx
> has a session variable and response.redirects the user to
> inetpub\anotherproject\test.aspx
> When I try to access the session variable after the redirection, it
> doesn't exist? I'm assuming this is because the two pages have separate
> bin files? How can I pass a variable between these two?
> Thanks.
> *** Sent via Developersdex http://www.developersdex.com ***

0 comments:

Post a Comment