Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug? OutputCache directive processed when commented out

0 views
Skip to first unread message

Amil Hanish

unread,
Aug 25, 2006, 1:14:55 AM8/25/06
to
I had an aspx page with output caching turned on. Then I wanted to do some
other stuff and I commented it out like:

<!--
<%@ OutputCache Duration="1800" VaryByParam="t" %>
-->

The IDE correctly shows this as a green comment...but don't be fooled. .NET
still processes and caches the output. In my case, the ClientID values
started being duplicated for a DataList object.

Amil


Juan T. Llibre

unread,
Aug 25, 2006, 1:29:18 AM8/25/06
to
re:

> The IDE correctly shows this as a green comment...but don't be fooled. .NET still processes and
> caches the output.

No, it doesn't.

Try :

<%--


<%@ OutputCache Duration="1800" VaryByParam="t" %>

--%>

HTML comment code doesn't affect ASP.NET server-side code.
You need to use proper ASP.NET comment marks.

You can also use :
<%-- @ OutputCache Duration="1800" VaryByParam="t" --%>


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Amil Hanish" <amilh...@hotmail.com> wrote in message
news:uV0GoVAy...@TK2MSFTNGP06.phx.gbl...

0 new messages