Developer forum

Forum » Feature requests » Possibility to remove the performance comment in html souce

Possibility to remove the performance comment in html souce

Kevin Steffer
Reply
We have been trying to output JSON from templates, and that is just straight forward, but we can't use it in standard solutions, because the HTML comment that show the page-performance etc. is not valid JSON.
<!-- Exe time: 0,031  < (1) >  <PageID (12)>  <Page from cache>  -->
It would be very nice to be able to get rid of this somehow.

Replies

 
Nicolai Høeg Pedersen
Reply
Hi Kevin

In a custom solution you can remove the Status literal from Default.aspx - on standard solutions it cannot be removed at the moment... New checkbox is coming up.

 
Gunnar Hansen
Reply
 Hello Nicolai,

i tried to remove the literal, but then I get an exception. Should I change anything else also? When will the checkbox be available? :-)

- gunnar
 
Gunnar Hansen
Reply
 Hello Nicolai,

i tried to remove the literal, but then I get an exception. Should I change anything else also? When will the checkbox be available? :-)

- gunnar

Hello again,

this removes the output:

<% if (false) { %>
<asp:literal id="Status" runat="server"></asp:literal>
<%}%>


- gunnar
 
Nicolai Høeg Pedersen
Reply
Hi Gunnar

You also have to move the code filling the literal from the code behind file...

Checkbox with next service release due later this month. Follow progress on release page.
 
Kenneth Radoor
Reply
 Hi

Another solution is :



/kenneth
 
Jan-Erik Ullevold Sveen
Reply
Original message by Kevin Steffer posted on 02/06/2011, 10:26:
... output JSON from templates, and that is just straight forward...
Hi, would anyone care to elaborate a bit on the approach for this, perhaps provide an example?

Do you actually output valid JSON from templates? (as in module templates, e.g. News templates?) - or am I perhaps misunderstanding the term "templates" here?

Any response much appreciated!

.jes