What is the correct way to comment inside an .aspx file?
The HTML syntax for a comment:
<!-- [COMMENT] -->
This doesn't work, I get the following: "ASP.NET runtime error:Only Content controls are allowed directly in a content page that contains Content controls."
I have also tried ', //, #, and --
FYI | ctrl + K , C is the comment shortcut in Visual Studio.
-- and -->.
aspx page, and then clicking the “comment” command button that is on HTML Source Editor Toolbar: This will automatically wrap the selected content with a <%-- --%> block. You can likewise move the cursor within it and click the uncomment command to remove the comment.
Direct entry:
<%-- your comment --%>
Visual Studio:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With