Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7721801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:01:04+00:00 2026-06-01T04:01:04+00:00

I’ve inherited a VB website (I’m a C# developer by trade) and need to

  • 0

I’ve inherited a VB website (I’m a C# developer by trade) and need to do some changes. On loading it into VS2010 it won’t compile/run because it has a <!-- --> pair surrounding some code in the style section of each form and VS is saying this is an unexpected character sequence.

I’m assuming it’s a vb comment tag, but I’ve Googled it to no effect and would very much appreciate some help with either making VS accept them, or advice on what to change them to so the original intent is not lost. NB – they appear around 100 times in the code so the former solution would be preferred!

I’ve tried <%-- which I use in C# but that doesn’t appear to work either.

Example:

<html>
<head>
    <title>
        <%=Session("PAGE_TITLE")%></title>
    <link href="../../css/sc_english.css" rel="stylesheet" type="text/css" />
    <asp:Literal ID="stylesheet1" runat="server" />
    <style type="text/css">
<!--
body {
    margin-left: 10px;
    margin-top: 0px;
    margin-right: 10px;
    margin-bottom: 0px;
}
-->
</style>
</head>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:01:06+00:00Added an answer on June 1, 2026 at 4:01 am
    <!-- --> is an html (and xml,xhtml etc.) comment block.
    

    Sometimes the visual studio designer ‘sync’ing can get confused if the comment block contains asp code.

    <%' Commented stuff here %>
    

    is a vb.net comment similar to <%– in c#


    After code sample posted…

    The html comment has been placed inside the css styles, it should really be either

    <!--
        <style type="text/css">
    
    body {
        margin-left: 10px;
        margin-top: 0px;
        margin-right: 10px;
        margin-bottom: 0px;
    }
    </style>
    -->
    

    or

     <style type="text/css">
    /*
    body {
        margin-left: 10px;
        margin-top: 0px;
        margin-right: 10px;
        margin-bottom: 0px;
    }
    */
    </style>
    

    i.e. use the html comment to comment out the html tag or use css comment block
    /* … */
    to comment out unwanted css styles.

    A well crafted regex find-replace or simple work by hand on all affected files will be required to get it sorted correctly I guess.

    VS is doings it’s job correctly – your other option is to turn off this warning but I would suggest having valid pages is a more sensible goal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.