no 'option' in aspx file means 'option'="false"?

C

Cas

Hi,

If i omit to mention e.g. the option 'debug' in the line below of an aspx
file, does it means it's set to false?

<%@ Page Language="VB" CodeFile="any.aspx.vb" Inherits="_Default" %>

Thanks
Cas
 
J

Juan T. Llibre

The default debug setting is "true".
In order to set it to "false" you must *explicitly* set it to "false".

The place to do that is in web.config's <compilation... section.

Set <compilation debug = "false" when you publish web sites.
*Never* run a production website with debug set to true.
 
C

Cas

Thanks for replying.
To be sure i understand:
if i put <compilation debug = "false" in the web.config, i don't need to put
"debug="false" in every aspx file. I just can omit it in every aspx file.
Right?

Cas
 
K

Kevin Jones

Actually the default setting is False!

If you don't set the debug attribute on the page, and you leave it out
of web.config entirely then the global web.config attribute is used. If
you look in <Framework Dir>\Config\web.config.comments you will see it
set to false.

As a test, compile the app with no settings, look in the "Temporary
ASP.Net files" directory and you will see no code files in there (.cs or
..vb), now change it to debug=true and re build the app and you'll find
the code files needed for debugging,

Kevin Jones
 
J

Juan T. Llibre

Oops, good catch!

This is the second time I thank you today.
Maybe I should have taken a nap before replying yesterday.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top