Script(s)

what I learn is what u c

Posts Tagged ‘Commenting

Comment on Server Side Asp.Net

with 2 comments

Inspired by ASP.NET 2.0 Server Side Comments

If you want to comment a particular column in GridView, HTML commenting approach wont work.

You have to use

<%--

--%>

example:

<asp:GridView ID="gvSample" runat="server" AutoGenerateColumns="False"
GridLines="None" CellPadding="0" CellSpacing="0">
<Columns>
<asp:BoundField DataField="Column1" ItemStyle-Width="25px" />
<asp:BoundField DataField="Column2" ItemStyle-Width="15px" />
<asp:BoundField DataField="Column3" ItemStyle-Width="15px" />

<%-- Commented Column --%>
&lt;%-- <asp:BoundField DataField="Column4" ItemStyle-Width="15px" />--%>

</Columns>
</asp:GridView>

Written by gchandra

October 2, 2007 at 9:53 am