How can I cache a user control in a page and uncache it in another page?

Q

Quentin Huo

Hi:

I have a user control "myUC" which is used in two pages, "page1.aspx" and
"page2.aspx". I want it cached in page1.aspx, but I don't want it cached in
page2.aspx.

Can I do this?

If yes, how can I do this?

If not, I have to create 2 user controls even though they have teh same
function? Any other solution?

Thanks a lot.

Q.
 
C

Charles Chen

Do a Google search on VaryByParam and VaryByControl
perperties.

These can be used to control output caching for user
controls based on parameters in the query string.

They may fit the bill.
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top