p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=560)
-   -   VWD 2010 Not Recognizing HTML Comments (http://p2p.wrox.com/showthread.php?t=85569)

BobRoberts November 3rd, 2011 03:48 PM

VWD 2010 Not Recognizing HTML Comments
 
I've tried about a half dozen times to comment out markup code, but the compiler (when I hit CTL+F5 or during intellisense) always behaves as if the commenting is not there. For example, on CTL+F5, the following code yields the error "The ID 'Login1' is already used by another control", even though the commented code is a green color. When I remove the "commented" code, it compiles ok, though I have to compile twice, as if it takes a while to realize the green code is gone. Is it the ASP.NET code varations? Do the standard HTML comments not work with the ASP.NET tags?


Code:

<asp:Login ID="Login1" runat="server" DestinationPageUrl="~/TEST1/QTEST1.aspx">
  </asp:Login>
 
 
  <!--  <asp:Login ID="Login1" runat="server" CreateUserText="Register New Login"
    CreateUserUrl="SignUp.aspx" DestinationPageUrl="~/TEST1/QTEST1.aspx">
  </asp:Login>  -->


Imar November 3rd, 2011 04:02 PM

Hi there.

<!-- and --> are used to comment out client side code. For server side code, select your code and press Ctrl+K + Ctrl+C. You'll then get a server side comments like this:

<%-- Your code --%>

Hope this helps,

Imar


All times are GMT -4. The time now is 03:32 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.