M
moondaddy
My default page stays constant in the site and all the content in the body
of the page is produced with user controls in a table cell for the body
section. The main function of this site is a products catalogue and the
products show in a datagrid in one of the user controls. This datagrid has
many rows and columns of images and this is what I'm most interested in
caching.
If I put
<%@ OutputCache Duration="500" VaryByParam="MenuID" Location="Client" %>
in the top of the ProductsListing user control then the default page gets
cached and when I click on a menu which should repopulate the datagird, it
shows the home page user control instead. I figured that putting this tag
on the user control just confused things, to the I put in on the top of the
default page and things behaved as though nothing was being cached. The
"MenuID" param is what gets passed into the default page where in the code
behind gets passed to the user control to populate the grid according to the
menu ID.
Can anyone offer some help on how to cache different versions of a user
control according to the param value?
of the page is produced with user controls in a table cell for the body
section. The main function of this site is a products catalogue and the
products show in a datagrid in one of the user controls. This datagrid has
many rows and columns of images and this is what I'm most interested in
caching.
If I put
<%@ OutputCache Duration="500" VaryByParam="MenuID" Location="Client" %>
in the top of the ProductsListing user control then the default page gets
cached and when I click on a menu which should repopulate the datagird, it
shows the home page user control instead. I figured that putting this tag
on the user control just confused things, to the I put in on the top of the
default page and things behaved as though nothing was being cached. The
"MenuID" param is what gets passed into the default page where in the code
behind gets passed to the user control to populate the grid according to the
menu ID.
Can anyone offer some help on how to cache different versions of a user
control according to the param value?