Per leggere nel file di configurazione devi usare la classe AppSettingsReader, nel namespace System.Configuration.
es.
ciao, javaloncodice:Dim Nome As <tipodato> Dim AppRead As New System.Configuration.AppSettingsReader Try Nome=DirectCast(AppRead.GetValue("<la_chiave_nel_webconfig>", getType(<il_tipo_di_dato_)), <tipodato>) catch ex as exception 'può essere che la chiave non esiste: segnararlo oppure ignorarlo End Try![]()

Rispondi quotando