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

Is there a way to include files in asp.net?

P: n/a
Right now at the top of each of my asp.net pages I have
<%@ Page Language="VB" Debug="true" %>

That's fine and dandy but when it comes time for me to switch debug to
true I'd rather have a central location to switch it, not go through
each file.

Is there a way to do that?

Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Include in your web.config, this :

<compilation debug="true" defaultLanguage="vb">

That will set debug to true for all pages.

You should use a Find-and-Replace utility to delete the
<%@ Page Language="VB" Debug="true" %>
from all your pages.

If at any point you decide you don't need to debug
any more, change the web.config entry to :

<compilation debug="false" defaultLanguage="vb">

best,

Juan T. Llibre
ASP.NET MVP
===========

"SirPoonga" <ke*********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Right now at the top of each of my asp.net pages I have
<%@ Page Language="VB" Debug="true" %>

That's fine and dandy but when it comes time for me to switch debug to
true I'd rather have a central location to switch it, not go through
each file.

Is there a way to do that?


Nov 19 '05 #2

P: n/a
Look at compilation tag in Web.config file you can set Debugging or not
Debuggin for the entire application.

<!-- DYNAMIC DEBUG COMPILATION

Set compilation debug="true" to enable ASPX debugging. Otherwise, setting
this value to

false will improve runtime performance of this application.

Set compilation debug="true" to insert debugging symbols (.pdb information)

into the compiled page. Because this creates a larger file that executes

more slowly, you should set this value to true only when debugging and to

false at all other times. For more information, refer to the documentation
about

debugging ASP.NET files.

-->

<compilation

defaultLanguage="c#"

debug="true"

/>

"SirPoonga" <ke*********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Right now at the top of each of my asp.net pages I have
<%@ Page Language="VB" Debug="true" %>

That's fine and dandy but when it comes time for me to switch debug to
true I'd rather have a central location to switch it, not go through
each file.

Is there a way to do that?

Nov 19 '05 #3

P: n/a
Can I put that in a local web.config.
I added that line in my web.config (which also contains appsettings).
However I get this error:
I even read
http://www.csharpfriends.com/Article...?articleID=307
Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error
details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section 'compilation'

Source Error:
Line 13: <add key="indexheader" value="Index" />
Line 14: </appSettings>
Line 15: <compilation debug="true" defaultLanguage="vb"/>
Line 16: </configuration>

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.