Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Errors in asp.net syntax
Message
 
À
26/01/2009 10:01:41
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
Divers
Thread ID:
01377040
Message ID:
01377053
Vues:
15
>I inherited an ASP.Net application that contains a master page. The application runs fine but when I look at the master page in Source view, I see a lot of the tags marked with red or green under lines showing errors in the source.
>
>The errors consist of:
> -The name contains uppercase characters, which is not allowed.
> -Attribute values must be enclosed in quotation marks.
> -Attribute 'bgcolor' is considered outdated. A newer construct is recommended.
> -Attribute 'height' is considered outdated. A newer construct is recommended.
>
>There are hundreds of these errors and warnings. Should I attempt to correct all of these errors? Is there an easy way to do this?
>
>I believe that this master page was originally a classic asp page that was made into a asp.net master page. Below is a small example of some of the syntax used in the source. What would be the best way to handle these issues?

The editor highlights things it thinks are invalid based on the currently selected document type. This is the <!DOCTYPE tag added at the beginning of the web page. Honestly, I think most people don't include the doctype (even though you really should). It is used by the client browser to determine how it should render a page.

Additionally, there is the "Target Schema for Validation" dropdown on the toolbar which tells Visual Studio against which standard to validate the HTML. My guess is that you've currently got it set to one of the XHTML standards when it should be set to something like HTML 4.

BTW - Here's a link which explains how you can choose a doc type:

http://htmlhelp.com/tools/validator/doctype.html
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform