Hi,
I want to use App.config file in order to get some values without recompiling. I created App.config on root of my project. I try to read values from App.config but it brings nothing. How can i read value from App.config?
App.config.xml
Here is code part:
I want to use App.config file in order to get some values without recompiling. I created App.config on root of my project. I try to read values from App.config but it brings nothing. How can i read value from App.config?
App.config.xml
VB.NET:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="result1" value="0" />
<add key="result2" value="1" />
<add key="result3" value="2" />
</appSettings>
</configuration>
Here is code part:
VB.NET:
Try
Dim num As String = ConfigurationManager.AppSettings("result1")
Response.Write(num)
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try