Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > About transferring session variables...

Reply
Thread Tools

About transferring session variables...

 
 
Hanumant Ganpat
Guest
Posts: n/a
 
      02-09-2010
I am working on webdevelopment using ASP.NET with C#. I am trying to
transfer page from one application to another application page.I have to
access session variables from last application into new transferred
page.How can I do?
If any one have any idea Please help me....!!



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Hillbilly
Guest
Posts: n/a
 
      02-09-2010
//Page1.aspx
Session["FirstName"] = FirstNameTextBox.Text;

//Page2.aspx
string firstName = Session["FirstName"].ToString();

--or--

//Page1.aspx
Session["NumberOfBitchyGirlfriends"] = 3;

//Page2.aspx
int bitchbitchbitch = (int)Session["NumberOfBitchyGirlfriends"];

NOTE: since you may --literally-- mean you want to transfer data from one
application to another we cannot use Application2 to access the Session
generated in Application1. If Application2 is in the same domain as
Application1 (mywebsite.com for example) we can then write a cookie in
Application1 to mywebsite.com that contains the Session variable and then
read the cookie from Application2 that also exists in the same domain
mywebsite.com; if not the same domain use the database or an XML file to
store the data as required.



"Hanumant Ganpat" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am working on webdevelopment using ASP.NET with C#. I am trying to
> transfer page from one application to another application page.I have to
> access session variables from last application into new transferred
> page.How can I do?
> If any one have any idea Please help me....!!
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      02-09-2010

"Hillbilly" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> int bitchbitchbitch = (int)Session["NumberOfBitchyGirlfriends"];


Hmmm.


 
Reply With Quote
 
deveti putnik
Guest
Posts: n/a
 
      02-10-2010

> //Page1.aspx
> Session["NumberOfBitchyGirlfriends"] = 3;
>
> //Page2.aspx
> int bitchbitchbitch = (int)Session["NumberOfBitchyGirlfriends"];
>


Hahahahaha....
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
Transferring Object from Session Variable to New Class Object??? Don Miller ASP .Net 4 02-06-2007 01:28 PM
Help with transferring Session object between pages. ESmith ASP .Net 3 10-19-2005 10:56 AM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
How can I "know" the difference between a session timed out and a session that did session.abort? Jazzis ASP General 2 09-23-2003 07:16 AM



Advertisments