Just saw the other day somebody suggesting using <%-- and --%> with server controls. Never tried it myself.
Greg
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:OL**************@TK2MSFTNGP09.phx.gbl...
It's important to understand the order of processing. <!--asp:TemplateColumn... is processed by the asp.net engine on the server side...and indeed <!-- is invalid asp.net code..
in normal HTML, when you do <!-- it sends it out to the browser and the browser choses not to display it (but you can still see the code via view source).
instead, try:
<asp:TemplateColumn visible="false">
...
</asp:..>
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"simon" <si*********@stud-moderna.si> wrote in message news:Os**************@TK2MSFTNGP09.phx.gbl...
If I try to comment some fields with <!--:
<!--<asp:TemplateColumn>
<HeaderTemplate>
<asp:Button ID="btnNew" CommandName="newType" Text="New Type" Runat="server"></asp:Button>
</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton text="DELETE" Visible='<%# Container.DataItem( "brisi" ) %>' CommandName="Delete" CommandArgument='<%# Container.DataItem( "mType_id" ) %>' Runat="server" ID="Linkbutton1"/>
</ItemTemplate>
</asp:TemplateColumn>-->
i get an error message:
Literal content ('<!--') is not allowed within a 'System.Web.UI.WebControls.DataGridColumnCollectio n'.
Any solution?
thank you,
Simon