I used DataPager , ListView and DataPager to display my data , everything(emphatically paging) was OK .I also changed the select method of objectDataSource this way:
ObjectDataSource1.SelectMethod= "GetPruductByCondition";
ObjectDataSource1.SelectParameters.Clear();
ObjectDataSource1.SelectParameters.Add("dropDownListValue", condition);
ObjectDataSource1.SelectParameters.Add("searchItem", searchItem);
it was OK too. But when i click on another page of DataPager , error below is displayed:
"ObjectDataSource 'ObjectDataSource1' could not find a non-generic method
'GetProductList'
that has parameters: dropDownListValue, searchItem."
how can I solve it?
(here is objectDatasource :
<asp:ObjectDataSource ID="ObjectDataSource1" OldValuesParameterFormatString="original_{0}" SelectMethod="GetProductList" ...>
)
as a matter of fact I need to implement searching, and when the SearchButton is clicked the default SelectMethod of ObjectDataSource1 should be changed;for the first time the button is clicked my implementation works but I can not use DataPager to see other search results .