J
Jarod_24
I Created a .config file for my Web application and named it
"Settings.config"
The file contains some settings for the application, including a connection
string to a database.
But i don't see how a System.Configuration. class finds the file.
I expected to be doing something like this:
'I just use 'AppSettingsReader' as an example here
Dim k as New system.Configuration.AppSettingsReader
k.Filename = mypath & "Settings.config"
Dim s As String = CType( k.GetValue("Connectionstring"), String)
But i don't find a .Filename property, and that tells me that you can only
use these Classes with the 'standard' .config files. The files that .Net
expect to be there; Like machine.config and maybe web.config.
How do i get to read values from my Custom .config file?
"Settings.config"
The file contains some settings for the application, including a connection
string to a database.
But i don't see how a System.Configuration. class finds the file.
I expected to be doing something like this:
'I just use 'AppSettingsReader' as an example here
Dim k as New system.Configuration.AppSettingsReader
k.Filename = mypath & "Settings.config"
Dim s As String = CType( k.GetValue("Connectionstring"), String)
But i don't find a .Filename property, and that tells me that you can only
use these Classes with the 'standard' .config files. The files that .Net
expect to be there; Like machine.config and maybe web.config.
How do i get to read values from my Custom .config file?