Microsoft Knowledge Base Email Alertz

KBAlertz.com: How to enable the Option Strict and Option Explicit statements in Visual Basic applications

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
KBAlertz referrals get
** SIX MONTHS FREE **


Community Site



We Send hundreds of thousands of emails using ASP.NET Email


ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








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

INTRODUCTION

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.

MORE INFORMATION

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>

REFERENCES

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
Keywords: 
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

PP Report As Irrelevant  
Written: 3/12/2006 8:48 PM
If the page can be set into fitting into a single screen (no Horizontal scroll, like the one in this page), that will be really good

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please