Use web.config appsettings to store global application's variables
web.config
<configuration>
<appsettings>
<add key="chiave" value="valore"/>
</appsettings>
</configuration>
pagina
<script language="VB" runat=server>
Sub Page_Load(Sender as Object, E as EventArgs)
Dim AppSettings as Hashtable = Context.GetConfig("appsettings")
myLabel.Text = AppSettings("chiave")
End Sub
</script>
<body>
Dal web.config: <asp:label id="myLabel" runat=server/>
</body>
</html>
Download Code...
Print Page