Posts Tagged ‘ServerSideControl’
Comment on Server Side Asp.Net
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 --%> <%-- <asp:BoundField DataField="Column4" ItemStyle-Width="15px" />--%> </Columns> </asp:GridView>
