• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

adding comments to asp.net markup inside asp control

how can I add comments inside an asp control?

<asp:gridview>
  <!-- comment -->            this line causes error.
   <asp:boundfield />
</asp:gridview>
0
dhenderson12
Asked:
dhenderson12
  • 4
  • 3
1 Solution
 
dhenderson12Author Commented:
sorry, the bound field is inside the <asp:columns> tags, just for clarity
0
 
CodeCruiserCommented:
I think you cant.
0
 
slightwv (䄆 Netminder) Commented:
For coding purposes or do you want the comment posted with the page?

Just checked with an old datagrid and this didn't 'syntax' but it did not post with the page.
  <%-- comment --%>
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
dhenderson12Author Commented:
No, it doesn't need to post with page.  I'm just adding comments to the page, same as I do in the code files.  It's for my own benefit, since I'm old and forgetful
0
 
slightwv (䄆 Netminder) Commented:
Did the above syntax work for you?

>> It's for my own benefit, since I'm old and forgetful

Aren't we all....  :)
0
 
dhenderson12Author Commented:
sorry, no they didn't.  in fact it generated an error "code blocks are not supported in this context".  I tried adding it in the column section of a gridview.
0
 
dhenderson12Author Commented:
I was wrong .. it worked like a champ!  I didn't realize that I had a space between the <% and the --.  I removed the space and it's works great.  Thanks.
0
 
slightwv (䄆 Netminder) Commented:
Glad to help!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now