1

Why does the commented control STILL search for it's tagName... What's the point... I mean, it's in comments, it's not suppose to even EXIST in the code. This is what comments are for, your supposed to be able to make that part of code invisible for the compiler. It dosen't makes sense to me that it's not. Can someone tell me what is going on ?

Edit :


I've been asked to show the kind of comments it was, so i'm going to post all the control.

<%@ 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);" />
  <% } %>
3
  • Um... What did you comment out? What kind of commenting out did you do?
    – Daniel
    Nov 9, 2015 at 20:30
  • @DanielCook here is the code Nov 9, 2015 at 21:08
  • 2
    That's probably not the kind of comment you want. Try using ASP.Net comment <%-- ... --%> instead of an HTML comment <!-- ... -->
    – Daniel
    Nov 9, 2015 at 21:22

1 Answer 1

4

Thanks to Daniel Cook. Using ASP.net comments instead of HTML comments solved the question.

Use :

<%--  Comments   --%>

instead of :

<!--  Comments   -->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.