Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Session Variable Name

Status
Not open for further replies.

DFatCat

Programmer
Nov 2, 2001
5
US
I want to be able to use a function to create a dataset under different names and then store that dataset into Session. I will pass in a name as a variable to save that dataset into Session as. I havent found the right way to dynamically create that Session variable name. Something like this below doesn't seem to work.

Dim ds AS Dataset (will be a populated dataset)
Dim SessionName As String

SessionName = "dataset1"
Session.Item(SessionName) = ds
 

Code:
dim DS as dataset
dim sessionName as String = "dataset1"
Session(sessionName) = ds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top