Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > User Group Events - Culminis
|
User Group Events - Culminis Post announcements about upcoming Culminis User Group events.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the User Group Events - Culminis section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 10th, 2007, 10:58 PM
Registered User
 
Join Date: May 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to tanu80 Send a message via Yahoo to tanu80
Default How to mantain the session value in different page

i am looking for to mantain the session value of one page in another page means: as per example i am posting the reply a question and showing the posted reply page ,but i am looking for a solution for the application like if a user wants to click on the reply link button , the user can come back to the reply page and he can send the reply of the same question once more time

Hi This is tanaya looking for some guide in developing .net application
  #2 (permalink)  
Old June 27th, 2007, 06:49 AM
Authorized User
 
Join Date: Jun 2006
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
Default

after login or in the login page wen u r checking for correct username and pwd thn only if user is valid, u can create sssion variables.

Session["username"]= value from database.

this session value is available to ur application until the user logouts.

hope i m gvng u the crct reply

Komila Sachdeva
Software Developer
Reliance engineering Associates (P) Ltd.
  #3 (permalink)  
Old December 7th, 2009, 02:29 AM
Registered User
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

u jst declare the session variable in global.asax like this
in session start
Session["anyvariablename"]=""
then in any page if u want to save a value in session.
jst put this code
Session["anyvariablename"]=anyvalue
and use it....this value is available in ur page uptill session outs.
hope this will help u...

pankaj manwatkar
software developer
  #4 (permalink)  
Old December 7th, 2009, 02:48 AM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Default

session variables are available in all pages
there is two functions declared in global.asax file that wire up when needed
Code:
void Session_OnStart(...)
{
 // when session starts. code goes here ... eg
 int counter = int.Parse(Session["onlineUsers"].ToString());
 counter++;
 Session["onlineUsers"] = counter;
}

void Session_OnEnd(...)
{
 // when a session ends
 int counter = int.Parse(Session["onlineUsers"].ToString());
 counter--;
 Session["onlineUsers"] = counter;
}
  #5 (permalink)  
Old December 7th, 2009, 02:49 AM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Default

and in your pages you can use this:

Code:
Response.Write(Session["onlineUsers"].ToString();
  #6 (permalink)  
Old February 6th, 2010, 01:21 AM
Registered User
 
Join Date: Feb 2010
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default

I have a webpage that contains two textboxes and button.
when the user fill the two textboxes and click the button
then I need to navigate to another page.
The second page contains a hyper link which can navigate you to the first page.
so, when the user click the hyper link i am navigating to first page.
This time I need to show up the values in the textboxes what user gave before.
  #7 (permalink)  
Old February 6th, 2010, 05:25 AM
Registered User
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Quote:
Originally Posted by nevaeh.aaric View Post
I have a webpage that contains two textboxes and button.
when the user fill the two textboxes and click the button
then I need to navigate to another page.
The second page contains a hyper link which can navigate you to the first page.
so, when the user click the hyper link i am navigating to first page.
This time I need to show up the values in the textboxes what user gave before.
Hi....
You can do this by putting the value of your textbox in session variable
firstly declare the session variable in global.aspx..
like this...
Session["Variablename1"]=""
Session["Variablename1"]=""
....
now on button click event of first page.....write this code
Session["Variablename1"]=textbox1.text
Session["Variablename2"]=textbox2.text

and on first page load event write this....

textbox1.text= Session["Variablename1"]
textbox2.text= Session["Variablename2"]

or u can findcontrol of first page and the put this value in it........
hope this will help u....
  #8 (permalink)  
Old February 9th, 2010, 05:24 AM
Registered User
 
Join Date: Feb 2010
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am currently working on an online shopping cart. The working is like:-
First the user selects the things.
Next page is the detail of the things that he has selected.
Now the third page allows the user to check his address..but before that he has to log in(if he is not logged in). and after logging in he must be redirected to the checkaddress page with his details intact.
  #9 (permalink)  
Old February 10th, 2010, 01:36 PM
Registered User
 
Join Date: Jan 2010
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default

for maintaining user information
session[username]=textbox1.text;
  #10 (permalink)  
Old March 14th, 2010, 08:00 AM
Registered User
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,am asking if I CAN GET AUTOMATIC BUSINESS SERVICES THROUGH MY MAIL ADDRESS.





Similar Threads
Thread Thread Starter Forum Replies Last Post
session in shopping cart page Jane Siu Beginning PHP 1 November 22nd, 2006 01:49 AM
Session Not available Problem in Master Page cbe_seenu ASP.NET 2.0 Professional 0 July 31st, 2006 08:47 AM
Session State - Page 265 ukbrit Dreamweaver (all versions) 5 November 3rd, 2004 06:55 AM
Passing Session Variables to the Next Page [email protected] ASP.NET 1.0 and 1.1 Professional 1 August 1st, 2004 06:25 PM
login page and session variables scdownload Classic ASP Basics 0 December 8th, 2003 06:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.