1

i have a user control on my page to show the profile picture of logged in user. I have cached this user control using <%@ OutputCache Duration="120" VaryByParam="none" %>.

I am facing an issue here i.e when i log out the current logged in user and log in as a different user the the profile picture user control is not getting refreshed, it still shows the picture of the previous logged in user.

Can some please help me in solving this issue when the user control refreshes after the user log's out and another user log's in.

Any help will be highly appreciated.

Thank you in Advance

Chuck Norris
  • 15,207
  • 15
  • 92
  • 123
Varun
  • 31
  • 5

1 Answers1

0

You could use <asp:substitution> control for UserControl parts that cannot be cached, look at this article about donut caching.

Since substitution control can just take string and render it you will have to render markup as string.

Antonio Bakula
  • 20,445
  • 6
  • 75
  • 102