G
Guest
Hi,
If I turn on the caching for a page with the following directive:
<%@ OutputCache Duration="600" VaryByParam="None" %>
will the Page_Load event always fire? If I have some static data that are
retrieved from the database and would like to avoid retrieving it every time
the page is accessed, could I use the above directive and include the
following statement in the Page_Load event?
if (!this.Page.IsPostBack)
Or is there a better way for doing this?
Thanks.
Mike
If I turn on the caching for a page with the following directive:
<%@ OutputCache Duration="600" VaryByParam="None" %>
will the Page_Load event always fire? If I have some static data that are
retrieved from the database and would like to avoid retrieving it every time
the page is accessed, could I use the above directive and include the
following statement in the Page_Load event?
if (!this.Page.IsPostBack)
Or is there a better way for doing this?
Thanks.
Mike