2006-11-10
Asp.Net2.0 WebCofig Appsettings標籤
1.web.config
2.讀取
Response.Write(ConfigurationManager.AppSettings("RealDocumentPath"))
3.修改(RunTime)
ConfigurationManager.AppSettings.Set("RealDocumentPath", TextBox1.Text)
4.寫入
Dim c As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration("/所在目錄")
c.AppSettings.Settings("RealDocumentPath").Value = TextBox1.Text
c.Save()
PS:需給該目錄有寫入的權限
2.讀取
Response.Write(ConfigurationManager.AppSettings("RealDocumentPath"))
3.修改(RunTime)
ConfigurationManager.AppSettings.Set("RealDocumentPath", TextBox1.Text)
4.寫入
Dim c As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration("/所在目錄")
c.AppSettings.Settings("RealDocumentPath").Value = TextBox1.Text
c.Save()
PS:需給該目錄有寫入的權限