Ti rispondo in basic, ma, se vuoi continuare, tu puoi rispondere pure in c#.
Basta fare un esempio.
Nel web.config ho questa riga:
codice:
<configuration>
<appSettings>
<add key="com.gama_system.www.servertime" value="http://www.gama-system.com/webservices/servertime.asmx"/>
***
nel codice ho questa classe:
codice:
Public Class Configuration
Public Shared ReadOnly Property getBaseUrl() As String
Get
Return System.Configuration.ConfigurationManager.AppSettings("com.gama_system.www.servertime")
End Get
End Property
End Class
e finalmente, nella pagina, NON IN UN CONTROLLO SERVER ho:
codice:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="a.aspx.vb" Inherits="prove_a" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Pagina senza titolo</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%=Configuration.getBaseUrl%>
</div>
</form>
</body>
</html>
che funziona benissimo alla prima volta :ignore:
Perciò, non vedo proprio il problema, almeno che non siano diverse le condizioni al contorno, cha hai tranquillamente tralasciato di farcele conoscere, ma che sono fondamentali per capire il problema. Ciao