By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

strict="true" - Not working in asp.net 2 and VS2005 ??

P: n/a
We are in the process of moving from .net 1.1 to 2.0 and I dont seem to
be able to resolve this problem.

In VS2003 the Option Strict was swtiched on in the options menu and
this was stored in a project file.

In VS2005 there is no project file so this is now stored in the
web.config. My web.config shows this :-

<compilation debug="true" strict="true" explicit="true">

This should ofcourse prevent such lines in the code behind like below
from occuring.

dim x as int32
x = "12"

However the IDE seems to ignore this option altogether.

Can anyone shed some light on what I am doing wrong?

In desparation I have to put Option Strict On at the top of each class,
but surely there is a better way of doing this?

Jan 30 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In the IDE.
On the Tools menu, choose Options.
Expand Projects and Solutions node.
Choose VB Defaults.
Modify the Option Strict setting

Jan 30 '06 #2

P: n/a
Hi.

I have the same problem. Changing the VB Defaults so that Option
Strict is On does not resolve the problem. Any suggestions?

-roncli

Feb 20 '06 #3

P: n/a
Yes,

see this:
http://lab.msdn.microsoft.com/produc...2-e99573d03c6e

It's going to be fixed in next Service Pack for ASP.NET.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

<ro****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hi.

I have the same problem. Changing the VB Defaults so that Option
Strict is On does not resolve the problem. Any suggestions?

-roncli

Feb 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.