PC Review


Reply
Thread Tools Rate Thread

Context Items on Page_Load

 
 
in
Guest
Posts: n/a
 
      4th Mar 2005

I pass a variable from one aspx page to another using Context.Item.Add

This works fine when the page first loads.

I set the value of a static global var to the value of Context.Item in
the page_load event, and use that.

However, for a button_click event, i want to use that variable, and it
seems that after a button_click is fired, all the global vars and are
set to their defaults...so I can't use that var, I have to wait until
the page_load even occurs ( which is after the button click ) !!

I converted to useing a Session var -- but, I ask: is there anyway to
accomplish my first method ?!

 
Reply With Quote
 
 
 
 
MasterGaurav
Guest
Posts: n/a
 
      5th Mar 2005
Put it in Session object. That's the only rescue.
Context is limited to page and is reset everytime page it loaded.

Context = Page-Context. Everytime you load a page, you need to add it
in Context.

--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
----------------------

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
how to add sub-items to context menu items weird0 Microsoft C# .NET 1 22nd Nov 2007 02:56 PM
removing items from a dropdownlist at page_load mharness Microsoft ASP .NET 0 9th Dec 2006 03:00 PM
Context.Items vs Context.Cache Rich Microsoft C# .NET 1 29th Dec 2005 11:56 PM
Asp:DropDownList. How to fill items on page_load? Shapper Microsoft ASP .NET 1 19th May 2005 04:20 PM
Context.Items vs Context.Handler (passing values between pages) VS_NET_DEV Microsoft ASP .NET 2 25th May 2004 02:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:26 PM.