Online Product Info
Global Settings

Description
The ASP.NET Auto DB control will automatically check your web.config and or machine.config files for certain properties that have not been provided. So you can set the following properties globally to apply to all forms in your web site or server:

Default Path
If you specify these properties in the ASP.NET Auto DB control tag and in your configuration file, the local (control tag) properties will override the global settings.

Example of a web.config File with ASP.NET Auto DB global settings
You specify the global settings in the <appSettings> section of your web.config file as shown in Listing A. If your Web.Config file doesn't have an appSettings section, simply add it as shown below.

Note: The web.config file is case sensitive. In addition, when adding the properties listed above to your web.config file, each property must begin with "ADB_"

<!-- Web.Config Configuration File -->

<configuration>
  <appSettings>
	<add key="ADB_MailServer" value="mail.mycompany.com"/>
	<add key="ADB_SMTPUser" value="scott2005"/>
	<add key="ADB_SMTPPass" value="mypass"/>
  </appSettings>

  <system.web>
	<customErrors mode="Off"/>
	<trace enabled="false" pageOutput="false" traceMode="SortByTime" localOnly="true" />
  </system.web>
</configuration>
 
Listing A

Note: If you don't have a Web.Config file, you can create one using a simple text editor like Notepad. Simply create a file called Web.Config. Cut and paste the text from Listing A above, and save it in the main folder of your web site.
 

© copyright 2004 360 IMPACT. All rights reserved.