Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typing comment notes within the GridView

To comment out a note in Code Behind, I can do this:

' This is my VB comment
/// This is my C# comment

In my .aspx page, I can use the following:

 <!-- I'm commenting on my .aspx page -->

as long as it is not within my

<asp:GridView></asp:GridView>

This gives me an error stating that Literal content is not allowed:

        <asp:BoundField DataField="Max_Scheduled_Pick" HeaderText="Max_Scheduled_Pick" SortExpression="Max_Scheduled_Pick" DataFormatString="{0:MMM dd yyyy}" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" ReadOnly="true"/>
        <!-- These are the Order Notes -->
        <asp:BoundField DataField="txt_Order_Key" HeaderText="txt_Order_Key" SortExpression="txt_Order_Key" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" />

Any suggestions on how to add comments into my code for documentation purposes?

Thanks,
Rob

like image 358
AKDad Avatar asked Mar 22 '23 23:03

AKDad


2 Answers

Try using ASP comments:

<%-- --%>
like image 135
Garrison Neely Avatar answered Apr 01 '23 13:04

Garrison Neely


Dang! Sometimes you just have to ask the question in a different way to get your answer. I found it: my comments need to be like this:

<%-- These are the Order Notes --%>
like image 38
AKDad Avatar answered Apr 01 '23 11:04

AKDad