PRB: Error Message: ASP 0221 Invalid @ Command Directive

Exclusion de responsabilité du contenu obsolète de la base de connaissances

Cet article a été rédigé sur les produits pour lesquels Microsoft n’offre plus aucune prise en charge. Par conséquent, cet article est proposé « en l’état » et ne sera plus mis à jour.

Symptoms

When creating and scripting new Active Server Pages (ASP) pages, you may receive the following error:
Active Server Pages error 'ASP 0221'
Invalid @ Command directive
This error occurs when you use the following syntax:
<%@ LANGUAGE="VBScript"
Response.Write "Generic ASP Code"
' Generic ASP Code
%>

Cause

The @ processing directive is not terminated properly.

Resolution

Terminate the @ processing directive properly as shown below:
<%@ LANGUAGE="VBScript" %>  '@ directive line terminated

<% 'Start script here
Response.Write "Generic ASP Code"
' Generic ASP Code
%>

Status

This behavior is by design.

More Information

The @ processing directive sends information to Internet Information Server (IIS) on how to process an ASP page. The LANGUAGE processing directive is used most often and sets the default server-side scripting language on an ASP page. Other processing directives include, but are not limited to, the following:
  • ENABLESESSIONSTATE
  • CODEPAGE
  • LCID
  • TRANSACTION

If more than one processing directive is needed on an ASP page, use the following code for two or more processing directives:
<%@ LANGUAGE="VBScript" ENABLESESSION="False" %>
Propriétés

ID d'article : 246828 - Dernière mise à jour : 16 juil. 2001 - Révision : 1

Commentaires