HTML注释在";文件.ascx“;行为不像评论
为什么注释控件仍在搜索其标记名。。。重点是什么。。。我的意思是,它在注释中,甚至不应该存在于代码中。这就是注释的目的,您应该能够使编译器看不到代码的这一部分。这对我来说毫无意义。有人能告诉我发生了什么事吗 编辑:HTML注释在";文件.ascx“;行为不像评论,html,asp.net,comments,ascx,Html,Asp.net,Comments,Ascx,为什么注释控件仍在搜索其标记名。。。重点是什么。。。我的意思是,它在注释中,甚至不应该存在于代码中。这就是注释的目的,您应该能够使编译器看不到代码的这一部分。这对我来说毫无意义。有人能告诉我发生了什么事吗 编辑: 我被要求展示它的评论类型,所以我将发布所有的控件 <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Menu.ascx.cs" Inherits="MandatMobile.Controls.Menu"
我被要求展示它的评论类型,所以我将发布所有的控件
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Menu.ascx.cs" Inherits="MandatMobile.Controls.Menu" %>
<!-- THIS MENU IS NOT OK
<div id="divi" style="float: left; position:absolute; left:-60px; top:120px;" >
<asp:Menu ID="bootMenu"
runat="server"
Orientation="Vertical"
StaticDisplayLevels="1"
StaticEnableDefaultPopOutImage="False"
OnMenuItemClick="BootMenu_MenuItemClick"
MaximumDynamicDisplayLevels="10"
EnableViewState="false"
CssClass="nav navbar-fix-top"
DynamicMenuStyle-CssClass="dropdown-menu"
IncludeStyleBlock="false"
SkipLinkText=""
RenderingMode="List">
<Items>
<asp:MenuItem Text="" ImageUrl="~/Img/Hamberger.png" ToolTip="Menu" Value="openMenu">
</asp:MenuItem>
</Items>
</asp:Menu>
</div>
-->
<div id='cont' style="position:absolute;" >
<% if (Convert.ToInt32(Session["Level"]) == 3)
{ %>
<input type="button" id="btnAjax" onclick="$(document).ready(function() { $('#cont').load('Controls/contentAdmin.html');});" style="float: left; position:absolute; width:40px; height:40px; left:10px; background-image:url(../Img/Hamberger.png);" />
<%}
else if (Convert.ToInt32(Session["Level"]) == 2)
{ %>
<input type="button" id="btnAjaxNormal" onclick="$(document).ready(function() { $('#cont').load('Controls/contentNormal.html');});" style="float: left; position:absolute; width:40px; height:40px; left:10px; background-image:url(../Img/Hamberger.png);" />
<% } %>
感谢丹尼尔·库克。使用ASP.net注释而不是HTML注释解决了这个问题
使用:
而不是:
<!-- Comments -->
Um。。。你对此有何评论?你做了什么样的评论?@DanielCook这是代码,可能不是你想要的评论。尝试使用ASP.Net注释
而不是HTML注释
<!-- Comments -->