including comments in ASPX code that don't render to the client? (c# 2.0)

M

mad.scientist.jr

In .NET 2.0, is there any way to include comments in the aspx file
that do not get rendered to the client (ie no <!-- -->) ?

When I try to include C# comments in a code block in an aspx page,
like this:

<%
// *******************************************************
// CHANGE HISTORY:
// DATE USER CHANGE
// 08/14/2007 Tue ebloom updated logo
// *******************************************************
%>

I am getting an error

The Controls collection cannot be modified because the control
contains code blocks (i.e. <% ... %>).

It would seem this is because .NET doesn't like inline code (even
though it isn't really "code" we want to include, just comments).

Including these comments in the codebehind is not preferred because
the changes are specific to the ASPX page. Our site has multiple
versions of a given aspx for each language, ie

/en/mypage.aspx
/de/mypage.aspx
etc.

and the codebehind is stored in

/common/mypage.aspx.cs

Any help appreciated, thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top