J
JJ
How can I set an ObjectDataSource's Parameter programmatically?
The slight complication here is that I want to set this NOT in the
'Selecting' method of the ObjectDataSource, but elsewhere.
I was hoping I could do something like:
ObjectDataSource.SelectParameters("MyParam") = thisValue.
But clearly not. I've managed to add a parameter with a value, but I cannot
reset it (it just adds another one and adds a number to its name to make it
unique):
ObjectDataSource.SelectParameters.Add("MyParam", thisValue) - works for one
itertion, but I need to set it to a new value each time.
I guess I could remove this each time and add the parameter again, but I
would have though there was a way I could change the value?
Thanks in advance,
JJ
The slight complication here is that I want to set this NOT in the
'Selecting' method of the ObjectDataSource, but elsewhere.
I was hoping I could do something like:
ObjectDataSource.SelectParameters("MyParam") = thisValue.
But clearly not. I've managed to add a parameter with a value, but I cannot
reset it (it just adds another one and adds a number to its name to make it
unique):
ObjectDataSource.SelectParameters.Add("MyParam", thisValue) - works for one
itertion, but I need to set it to a new value each time.
I guess I could remove this each time and add the parameter again, but I
would have though there was a way I could change the value?
Thanks in advance,
JJ