Script(s)

what I learn is what u c

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>
Advertisements

Written by gchandra

October 2, 2007 at 9:53 am

2 Responses

Subscribe to comments with RSS.

  1. very interesting, but I don’t agree with you
    Idetrorce

    Idetrorce

    December 15, 2007 at 8:58 am

  2. well done, brother

    Janessaqi

    March 19, 2008 at 10:57 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: