Datasource parameters?

B

Ben

I'm having difficulty getting a parameter value used in an Object Data
Source that populates a GridView control. Here's the overview:

GridView 1 has a button on it which the user clicks to drill down into data
subordinate to the record they're looking at. When the button is clicked,
GridView2 is supposed to populate with data from another table, filtered by
a field on the row in GridView1 whose button was clicked.

Right now the only way I can get it working is to have the key field for
GridView2 stored as a Session variable (done in the RowCommand event of
GridView1 when the button is clicked), and then tell the Object Data Source
for GridView2 that the key is that session variable (that's done when
configuring the object data source).

Is there a way to tell the Object Data Source to get its value from, say, a
property of the Page? According to the dropdown list in the Configure Data
Source / Define Parameters window, my only choices are "None", "Cookie",
"Control", "Form", "Profile", "QueryString", and "Session". I tried 'Form',
using a public property to store the parameter value, but couldn't get that
to work.

Other than Session, is there another way?

Thanks.
Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top