
January 15th, 2001, 11:52 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,578
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
Using config.web
<i><b>Originally posted by : David Keaveny (david.keaveny@cassium.com)</b></i><br />I'm trying to setup some application-wide variables in the config.web file, using the various samples provided on this page, like this:<br /><br />(config.web)<br /><br /><configuration><br /> <appsettings><br /> <add key="myDSN" value="Provider=SQLOLEDB.1;Data Source=localhost" /><br /> </appsettings><br /></configuration><br /><br />In app,<br /><br />Dim strConnection As String<br />Dim objConfiguration As Hashtable<br /><br />objConfiguration = Context.GetConfig("appsettings")<br />strConnection = objConfiguration("myDSN")<br /><br />Unfortuantely, .NET chokes when it comes to the Hashtable declaration, saying it is an unknown datatype. Were all the samples done on pre-beta .NET, which might have subsequently changed, or am I doing something very wrong?<br /> <br />
|