CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Saturday, September 02, 2006

Global variables in asp.net

<configuration> <appSettings> <add key="smtp_server" value="smtp.hostname.com" /> </appSettings> .... </configuration> Then, in your ASP.NET application, you can access this value by using using System.Configuration; SmtpMail.SmtpServer = ConfigurationSettings.AppSettings["smtp_server"]; 

Post a Comment