Varying the Output Cache by Parameter
The VaryByParam attribute causes a new instance of a page to be cached when a different parameter is passed to the page.
File: Master.aspx
<%@ Page Language="C#" %>
Master
File: Details.aspx
<%@ Page Language="C#" %>
<%@ OutputCache Duration="3600" VaryByParam="id" %>
Details
You can assign two special values to the VaryByParam attribute:
none: causes any query string or form parameters to be ignored.
*: caches a new cached version whenever there is a change in query string or form parameter passed to the page.
You can assign a semicolon-delimited list of parameters to the VaryByParam attribute.