Is there a way to comment out markup in an .ASPX page?

后端 未结 8 1730
暗喜
暗喜 2020-12-22 18:05

Is there a way to comment out markup in an .ASPX page so that it isn\'t delivered to the client? I have tried the standard comments

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-22 19:10

    While this works:

    <%-- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ht_tv1.Default" %> --%>
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Blank._Default" %>
    

    This won't.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" <%--Inherits="ht_tv1.Default"--%> Inherits="Blank._Default" %>
    

    So you can't comment out part of something which is what I want to do 99.9995% of the time.

提交回复
热议问题