Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 246828 - Last Review: July 16, 2001 - Revision: 1.0
PRB: Error Message: ASP 0221 Invalid @ Command Directive
This article was previously published under Q246828
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
%>
The @ processing directive is not terminated properly.
Terminate the @ processing directive properly as shown below:
<%@ LANGUAGE="VBScript" %> '@ directive line terminated
<% 'Start script here
Response.Write "Generic ASP Code"
' Generic ASP Code
%>
This behavior is by design.
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" %>
APPLIES TO
- Microsoft Active Server Pages 4.0
| kbcodesnippet kberrmsg kbprb KB246828 |
Retired KB Content DisclaimerThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate