0

As example, I login in to the system ad... But how can i use the session function to recall the current applicationid? Which I need to store in form and to the other table of database.. Behind code.. vb not c# Thanks a lot. Your guide is appreciate .

Example.. 1. Login with the session fix (userid) in virtual studio.. 2. I wanna recall it out (userid) .. How !! Problem 1 3. Fill the (userid) to other table in database. That Y ! 4. Grid view data show with specific (userid) only.. in session !! Problem 2

Thank splattne !!

I think that show be replace the word (applicationid) to (userid) .. my mistaken... Cos after i recheck the table of aspnet_membership!!

2
  • Please try to explain it better... Mar 8, 2009 at 14:42
  • I have some questions: what do you mean by "session fix (applicationid)? Is that something specific to your program/database? What do you mean "fill the ... to other table"? Insert that value in a table "SessionId, ApplicationId"?
    – splattne
    Mar 8, 2009 at 15:48

2 Answers 2

2

The ASP.NET Session isn't a function, but an object, more specifically a specialized Collection (SessionStateItemCollection) kept in memory with a timeout specified. You can insert data (other objects) in that "container" using strings as keys like "UserName", for example:

Session("UserName") = "billg"

You can retrieve that value the same way:

Dim UserName as String = Session("UserName")

You can find an Overview to Session State on MSDN.

0

Not sure this is what you are after but the SessionID will change event after the session starts until you actually store a value in Session. Better to come up with your own ID or SQL based identity and store that in Session.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.