c# - @OutputCache problem in a UserControl -


i have user control outputcache:

<%@ outputcache duration="86400" varybycontrol="lnkbtntopvanzari" %> 

where varybycontrol id of link button use switch active view of multiview contained in updatepanel.

the problem when press link button, page full post back , view not switched.

if remove outputcache directive, works great (pressing link button correct view shown via ajax).

do know wrong?

thanks.

the varybycontrol parameter used vary depending on value of control specify. value of link button same, cache not varied.

i believe intended used controls such dropdown lists, feasible output different based on selected value in list.

you may want try using varybyparam , changing link button hyperlink, specifying view query parameter, or trying out varybycustom. otherwise possibly possibly split content of views separate user controls output cached, leaving multiview , link button outside caching.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -