Sunday, 23 November 2008
DotNetSpace, Asp.net 2.0 tutorials and code examples. ajax, log4net...
Home arrow Articles arrow General Articles arrow External application variables
 
Main Menu
Home
Articles
News
Links
Search








BiraJones




External application variables Print E-mail
Friday, 18 August 2006

 Using this you can configure some variables or constants in the web.config file to use in you project code files: (This works for ASP.NET 2.0 version)
 

    //1- use the <appSettings> tag to put your site configurations or constants
    <appSettings>
        ...
        <add key="emailAdmin" value=" This email address is being protected from spam bots, you need Javascript enabled to view it " />
        <add key="anyName" value="anyText" />
        ...
    </appSettings> ...
    
   

 

//2- howto use:
  string anyName = ConfigurationManager.AppSettings["anyName"];

Last Updated ( Tuesday, 31 October 2006 )
 
< Prev   Next >
Popular
Polls
-->*/?>

Which language will you choose for coding with Visual Studio .NET?
 
-->*/?>

Is ASP.NET better than Java / JSP frameworks?
 

© 2008 DotNetSpace
Joomla! is Free Software released under the GNU/GPL License.