Staying on a page for awhile causes error

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top