Wrox Programmer Forums
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 3rd, 2011, 03:48 PM
Registered User
Join Date: Oct 2011
Posts: 18
Thanks: 0
Thanked 2 Times in 2 Posts
Default 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?

 <asp:Login ID="Login1" runat="server" DestinationPageUrl="~/TEST1/QTEST1.aspx">
   <!--  <asp:Login ID="Login1" runat="server" CreateUserText="Register New Login" 
    CreateUserUrl="SignUp.aspx" DestinationPageUrl="~/TEST1/QTEST1.aspx">
  </asp:Login>  -->
Old November 3rd, 2011, 04:02 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

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 Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Similar Threads
Thread Thread Starter Forum Replies Last Post
VWD 2010 Default.aspx HarryBatt BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 August 2nd, 2010 10:25 AM
Windows 7 & VWD 2010 Saranjiv BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 July 13th, 2010 04:50 PM
Visual Studio 2010 in Focus at Great Indian Developer Summit 2010 shaguf5575 ASP.NET 1.x and 2.0 Application Design 0 February 24th, 2010 07:02 AM
Unwanted z-index in html markup using VWD VictorVictor ASP.NET 2.0 Basics 3 July 25th, 2006 07:51 AM
Read HTML comments with Javascript benburrows Javascript How-To 3 October 29th, 2004 12:50 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.