RobLog

Web Design in the World of .NET (C# and VB.NET, XML, and Javascript). I learned how to program from TheDailyWTF.com!
posts - 140, comments - 127, trackbacks - 5

My Links

News

Main Site Cert Corner Goals About Me

Article Categories

Archives

Post Categories

Image Galleries

.NET

Personal

WOW


How to get Option Strict to work in VB2005 Web Site Projects - BUG?

I just recently started working with the VB2005 Website instead of the Web Application Project (Beta 2 still) and found an interesting issue. 
There is no project related file to look at properties on.  So I was trying to turn on Option Strict because I had it set to on by default.

I figured that I would probably be setting it in the web.config file at some point, but searching didn't help much for awhile. 
Apparently not alot of VB developers like to turn this setting on, so I finally found the answer on Microsoft's site:
http://msdn2.microsoft.com/en-us/library/2fdbs127(VS.80).aspx

<compilation strict="true" />

So what does this do for you?  Well it will give you Option Strict in aspx pages ONLY.  By default it doesn't cover the code behind pages that some of us use,
which is where it is more important that it be applied.  But hey, maybe the testers never really liked Option Strict and so didn't complain when nothing changed for them when they enabled it.

posted on Thursday, April 06, 2006 5:59 PM

Post Comment

Title  
Name  
Url
Comment   
Protected by Clearscreen.SharpHIPEnter the code you see: