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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

define datasource parameters using session variable

Status
Not open for further replies.

daughtd

Programmer
Sep 6, 2006
15
US
I am trying to set a parameter for a datasource using the "Define Parameters" Dialog box with a value from a session variable which is holding a datatable with 2 columns (col1 and col2). How can I access the session variable's col2 value? I've tried using "Cart.col2" (Cart is the name of the session variable).
 
Did you figure this out?

I've never tried this, but I think you'll have to convert it. Probably best done in the code behind, because you're going to need to have accesses to the cell of a datatable within the session.

Something like,

Dim a as DataTable = CType(Session("Cart"), DataTable)
Dim b as String = a.Rows(0).Item(0).ToString

Then DataSource.SelectParameters(...).

Don't really have VS open right now, but might point you in some sort of direction. Try something like that, if it doesn't work then I'll try to think of something else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top