Click here to Skip to main content
15,891,136 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: CDOsys & Read receipt Pin
-- NA --16-Feb-04 5:30
-- NA --16-Feb-04 5:30 
GeneralFTP Program Pin
bpchia12-Feb-04 21:54
bpchia12-Feb-04 21:54 
GeneralRe: FTP Program Pin
alex.barylski13-Feb-04 0:34
alex.barylski13-Feb-04 0:34 
GeneralRe: FTP Program Pin
bpchia13-Feb-04 4:02
bpchia13-Feb-04 4:02 
GeneralRe: FTP Program Pin
alex.barylski13-Feb-04 9:58
alex.barylski13-Feb-04 9:58 
GeneralWeb Browser Pin
TrungHuynh12-Feb-04 20:48
TrungHuynh12-Feb-04 20:48 
GeneralRe: Web Browser Pin
alex.barylski13-Feb-04 0:35
alex.barylski13-Feb-04 0:35 
QuestionUsing Session in Web Parts? Pin
Member 85730411-Feb-04 7:12
Member 85730411-Feb-04 7:12 
Hi,

I have a Web Part that I have built using VB.NET. It all works fine and I have included it on a couple of pages (STS 2003), however what i'd now like to do is to persist a variable using Session.

I have modified the line in Web.Config to enable session: -

<add name="Session" type="System.Web.SessionState.SessionStateModule" />

And in my Web Part I have imported the relevant namespace: -

Imports System.Web.HttpContext

And added the following code to one of my page events: -

Current.Session.Add("ProductID", "A11234E")

Unfortunately as soon as this event fires and the code to add my session variable is executed it all blows up!

Can somebody please tell me where I am going wrong, or better still post up some code of a Web Part using session variables (I don't mind C# or VB.NET).

Thanks in advance.

Mark
GeneralMoving controls housed in a Panel control.... Pin
gordingin11-Feb-04 2:52
gordingin11-Feb-04 2:52 
GeneralRe: Moving controls housed in a Panel control.... Pin
John Kuhn11-Feb-04 14:18
John Kuhn11-Feb-04 14:18 
GeneralPerl / Tk. Help needed!! Pin
joniboy12311-Feb-04 0:24
joniboy12311-Feb-04 0:24 
GeneralI.E.5.0 on MAC OS Pin
jillellamudi10-Feb-04 20:04
jillellamudi10-Feb-04 20:04 
GeneralRe: I.E.5.0 on MAC OS Pin
Not Active11-Feb-04 7:09
mentorNot Active11-Feb-04 7:09 
GeneralRe: I.E.5.0 on MAC OS Pin
jillellamudi11-Feb-04 17:19
jillellamudi11-Feb-04 17:19 
GeneralRe: I.E.5.0 on MAC OS Pin
Not Active12-Feb-04 2:54
mentorNot Active12-Feb-04 2:54 
GeneralRe: I.E.5.0 on MAC OS Pin
l a u r e n11-Feb-04 14:10
l a u r e n11-Feb-04 14:10 
GeneralRe: I.E.5.0 on MAC OS Pin
Not Active12-Feb-04 3:15
mentorNot Active12-Feb-04 3:15 
GeneralRe: I.E.5.0 on MAC OS Pin
Paul Watson12-Feb-04 5:53
sitebuilderPaul Watson12-Feb-04 5:53 
GeneralRe: I.E.5.0 on MAC OS Pin
jillellamudi12-Feb-04 17:20
jillellamudi12-Feb-04 17:20 
GeneralJavascript Pin
Boonirkc10-Feb-04 16:48
Boonirkc10-Feb-04 16:48 
GeneralRe: Javascript Pin
John Kuhn10-Feb-04 20:56
John Kuhn10-Feb-04 20:56 
GeneralRe: Javascript Pin
l a u r e n11-Feb-04 14:13
l a u r e n11-Feb-04 14:13 
GeneralRe: Javascript Pin
lanying_wzw27-Feb-04 3:49
lanying_wzw27-Feb-04 3:49 
Generalunable to Log in annoymous on web application Pin
Anonymous10-Feb-04 8:35
Anonymous10-Feb-04 8:35 
GeneralBrowser Compatibility Issues Pin
srt710-Feb-04 6:26
srt710-Feb-04 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.