You can use the appSettings section :
<appSettings>
<add key="link1" value="http://www.test.com/index.asp"/>
</appSettings>
To get the setting :
<script language="vb" runat="server">
Sub Page_Load()
Dim mylink1 as String = (ConfigurationSettings.AppSettings("link1"))
' do something with the link1 string variable, which now holds the link you want.
End Sub
</script>
If you want to use the ConfigurationManager, use :
Dim mylink1 as String = ConfigurationManager.AppSettings.Get("link1")
Either one will do...
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
===================================
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:uu**************@TK2MSFTNGP04.phx.gbl...
ASP.NET 2.0
I'm wondering how to add a custom setting into web.config. From this website I'm doing a http
request to another website, and I would like to have the webaddress of this other website stored
as a value in web.config. So just in case the webaddress is wrong I wouldn't need to recompile it
later... So where in web.config should such a custom setting be placed?
Lets say the custom section is like this:
<test>www.test.com/index.asp<test>
How can I access this <testvalue using configurationmanager?? or is it correct to use
configurationmanager to access the value??
Jeff