I have to implement the data paging to the datalist I have in my existing application.
What I have
Stored procedure - which has if else condition
If(Seacrh Criteria)
Select based on Search Criteria
Else
Select every product
Now, I want to implement data paging in the datalist I have on aspx page. The problem is that I need to specify the ObjectDataSource to the stored procedure which is bound to the grid view.
I don't want to take any parameter from the querystring. As I have multiple seacrh parameter, the other reason is that I don't want postback.
Might be my explanation is confusing because I want to explain each and everything.
I will try to summarize it:
- I have a datalist control.
- I want data paging by using the existing stored procedure.
- I have already created a dataset [by Add new Item] for the stored procedure. [Product.xsd]
- I don't want to take any parameter from Querystring, I need almost 15 parameter which I have to take from server side.
- My stored procedure is ready..Followed by this tutorial
- What should I write in the TypeName attribute of the ObjectDataSource?
Edit1
I have a seen a better example with Linq to Sql but my issue is that my stored procedure is too big that it can not be transformed into linq query. Any help ?