Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 911793 - Last Review: December 6, 2006 - Revision: 2.3
How to enable the "Option Strict" and "Option Explicit" statements in Visual Basic applications
This article describes how to enable the
Option Strict and
Option Explicit statements in Microsoft Visual Basic applications for code-behind files and files that
are contained in the App_Code folder.
To enable the
Option Strict and
Option Explicit statements in the code-behind files and files that are contained in the App_Code
folder of a Visual Basic application, override the compiler configuration in
the
system.codedom section of the Web.config file for the application. To do this,
add the following code to the Web.config file:
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="0" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="0" />
</compilers>
</system.codedom>
For more information about how to create the Web.config file for an ASP.NET application, click the following article number to view the article in the Microsoft Knowledge Base:
815179Â
(http://kbalertz.com/Feedback.aspx?kbNumber=815179/
)
How to create the Web.config file for an ASP.NET application
APPLIES TO
- Microsoft Visual Basic 2005
- Microsoft Visual Basic .NET 2003 Standard Edition
- Microsoft Visual Basic .NET 2002 Standard Edition
| kbhowto kbtshoot kbinfo KB911793 |
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
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please