user control caching

G

Guest

I am caching a user control for an hour, based on a certain property. When
the page first loads the page is cached just fine. However, whenever I close
the browser screen and then go back into it I get the following error:
Object reference not set to an instance of an object. Does anyone have any
ideas?

The cache directive in the .aspx page:
<%@ OutputCache Duration="3600" VaryByControl="Category" VaryByParam="*" %>

Properties set of the control in the .aspx page:

' The error: "Object reference not set to an instance of an object."
occurs in the first line below.
ctrlEditScreen.Category = category
ctrlEditScreen.FieldDefinitionsDatasource = MyDatasource
ctrlEditScreen.UserName = MyName

Any help is greatly appreciated!
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top