By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

Cross-Page PostBack, Master page, and GridView issue in ASP.Net 2.0

P: n/a
I am working with a multi-field search form which, when the form is
submitted, queries a database and returns the results into a paginated
GridView object. The site is being developed with master pages.

So far, I have had success in building the search form, and passing the
values entered by the user from the form to a results page, and
displaying the entire resultset using GridView. However, when I set
the AllowPaging option on the GridView tag to true, I get the following
error when I try to move from one GridView page to the next:

"Object reference not set to an instance of an object"

The objects that it is trying to reference, of course, are all of the
search parameters submitted on the search form which I was able to call
using the PreviousPage object. So far, all of this makes a sort of
sense to me; I'm pretty sure I know why the PreviousPage calls fail
when Gridview is set to allow paging.

So really, my question is: What is the best way of capturing the data
from a cross-page post back so that the values are retained in such a
way that a GridView object may be set to page its results?

May 22 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more ASP.NET Questions on Bytes