Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 13th, 2007, 09:17 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sessions, and passing data to another page

hi guys,
i'm building a web site where i have a lot of pages, in the default page i'm having a menu in this menu i have a callendar a drop down list, in the callendar i need to remember the date selected by the user and for the drop down list i have to remember the value selected by the user, these values i need them to query the database.the first time it works great the selected item in the drop down list can be read by any other page(in different pages i'm taking these values and displaying different graphs and table) but when i change the selected value in the drop down list in the default page, it does not change for the other web pages. i was thinking of storing the whole page in a session, but i do not know how to implement this. or may be you have some other suggestions so when i change the value in the default page it will also passed to the any other page i need and then the change the values for these pages.

any help will be very appreciated.
it is realy starting to annoying me ;(

thanks

Reply With Quote
  #2 (permalink)  
Old March 13th, 2007, 09:26 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

...Why would you want to store an entire PAGE in session? >< That will crush your server preformance and really isn't practicle.

Only store the value you need in session so, for example, the value from your dropdown might look like this:

Session.Add("dropDown",Convert.ToString(dropdown.S electedItem.Value));

Then to read that value on another page you might do:

int iValue = Convert.ToInt32(Session["dropDown"]);

hth.


================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #3 (permalink)  
Old March 13th, 2007, 10:21 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your quick reply,
i already tried this, the first time the page loaded the other pages can read the value of the drop down list, but when i changed the vakus of the drop down list it does not changed for the other pages, i'm puting a text label also in the master page so whenever i changed the value of the drop down list it will be showing in the top of the page and it is working but for the other pages inside the contentholder the value does not change it stays the same.
also i have a feature that disable the date better that date.now, so when i run the default or the master page the date is disabled but when i click in another page the date are anabled again, that is why i tought may be holding the information of the whole page will solve that problem, may be you have another suggestion. i'm also a newbies in asp.net, this is my first project.

thanks for helping

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in passing data to next page. Somesh ASP.NET 2.0 Professional 4 March 15th, 2007 10:16 PM
Passing through sessions dmlocke BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 May 15th, 2005 11:35 AM
Passing Variables through Sessions dmlocke Beginning PHP 2 April 27th, 2005 05:40 AM
passing through sessions not working dmlocke PHP Databases 2 April 26th, 2005 08:21 AM
Passing value without using sessions lic023 Classic ASP Basics 1 July 20th, 2004 09:58 AM



All times are GMT -4. The time now is 07:10 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.