Staying on a page for awhile causes error

G

Guest

I have a simple search utility that works perfectly except
if the user were to step away from her terminal after finding the results
for - 7 minutes or so, and try to go back to the main page
an error is generated:

(Any idea how to prevent this?)
Object reference not set to an instance of an object
[NullReferenceException: Object reference not set to an instance of an
object.]
Membership.MemberDetail.ShowMember() +1166
Membership.MemberDetail.Page_Load(Object sender, EventArgs e) +7
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
 
G

Greg Young

My guess would be without seeing your code in the

MemberDetail.ShowMember() method

that you are either accessing a Session or Cached variable which is no
longer present at the time of postback and not handling the case of it not
being there (i.e. returning null).

Cheers,

Greg
 

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

Top