Error setting parameters on cached usercontrol

J

Jens

Hello,

I've created a usercontrol that's cached:
From the source page I set some parameters of the control:
UserControl.SubID = 2
UserControl.Subrubriek = "Test"

When I load the page for the first time everything is okay, but when I
reload the page I get an error "Object reference not set to an
instance of an object" on the line "UserControl.SubID = 2"

I think this is because the object is cached when reloading the page.
How can I check if the usercontrol is in cache so I can skip the code
above?

Thanks in advance,
Jens
 

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,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top