When I did a search, I found this solution that uses a generic
The solution ended up being pretty simple. What I did was:
- create a TextBox control on the page
- set the TextBox Text property to the value of my variable obtained from the query in Page_Load
- use a ControlParameter for the SelectParameter of the data source and specify that TextBox control as the control from which to get the value
In my case, it turned out that I could keep the control visible on the page because it was useful information, but if that isn't option for you then you could just set the control's visibility to false.