Setting value of parameter in ObjectDataSource

  • Thread starter Thread starter Allan Ebdrup
  • Start date Start date
A

Allan Ebdrup

I have an object data source, that takes a parameter sortData, that sorts
the data, now I want to have the sorting set to a default value when i first
load the ASP.Net 2.0 page. I've tried to set the DefaultValue of the
parameter but it doesn't change the sorting.
I've also tried to see if i could set the value of the parameter in the
SelectParameters collection of the object data source, but there is no way
to set the value, so my question is: How do i set the value of the object
data sources parameter to some default value the first time the page loads?

Kind Regards,
Allan Ebdrup
 
I found a solution, I set the SortExpression in the Selecting event of the
object data source.
 
Back
Top