not good with CS or controls have have just been playing with context
and sounds like it might help you. Is the reason that you can't set the
session variable in the dll because you don't seem to have access to it?
If so then pass a reference to context.current and you should be able to
access all of the page context and thus the session vars from there
have a look at
http://msdn.microsoft.com/library/en-us/dnaspnet/html/asp01242002.asp
for a really good article on it. Or another article by the same author
at http://www.swarren.net/CustomControls.doc on custom controls
Pat
-----Original Message-----
From: Richard [mailto:r.mckinley@k...]
Sent: 22 March 2002 17:19
To: ASPX_Professional
Subject: [aspx_professional] Maintaining State with Custom Server
Controls
Hi,
I have a webpage personal_calendar.aspx page (with code-behind file
personal_calendar.cs), which hosts a custom server control. The server
control reacts to user events, and I need to set the state of the page
within a server control eventhandler ie. the user clicks on the edit
button of the control - I want to store that the page is now in edit
mode. So, after postback when the page is reloading it knows it is in
edit mode and can execute the appropriate code.
I don't appear to be able to set session variables from the dll,
implementing the server control and I don't see a way of calling code in
personal_calendar.cs to set it from there either.
It would be much appreciated if anyone could point me in the right
direction as to how this is done, or direct me to any relevant
samples/tutorials/resources on web?
Thanks,
Richard
--------------------------------------------------------
The contents of this e-mail are confidential to the ordinary user of the
e-mail address to which it was addressed, or in the case of an
incorrectly addressed e-mail message, the intended recipient. No-one
else may copy, use, disseminate or forward all or any part of it in any
form.
Although this email, including any attachments, is believed to be free
of any virus, or other defect which might affect any computer or IT
system into which it is received and opened, it is the responsibility of
the recipient to ensure that it is virus free, and no responsibility is
accepted for any loss or damage arising in any way from its use.
The views expressed in this e-mail are those of the sender and not
necessarily the employees company.
If you receive this e-mail in error please accept our apology. If this
is the case we would be obliged if you would contact the sender and then
delete the e-mail.
--------------------------------------------------------