2 problems with GridView and ObjectDataSource

J

Jeff

hi

ASP.NET 3.5

I have a GridView and a ObjectDataSource on my webpage. The ObjectDataSource
is that datasource of the GridView.

I have 2 problems with these 2 objects:

problem #1
When the webpage is loading the ObjectDataSource execute the SelectMethod. I
want to avoid this so the SelectMethod isn't executed when page loads.. How?
if possible!

problem #2
I have a LinkButton on my webpage. When this button is clicked I want the
ObjectDataSource's SelectMethod to execute and fill the GridView.. I don't
know how to manually do this. I've tried GridView.databind() and
ObjectDataSource.databind() without any success

(GridView and ObjectDataSource has enabled paging, size 10)

(This is a page where the user can seach for information, he needs to enter
what he wants to search for and then click on the LinkButton, so no need to
perform a search when page load as no search phrase is entered in the
textbox)

any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top