Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to define global variables?
Message
From
10/11/2003 10:11:03
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00848129
Message ID:
00848284
Views:
19
>Yes, in the Configuration level.

I put this in the Configuration level:
  <appSettings>

     <!--Web Service authentication-->
     <add key="Username" value="username" />
     <add key="Password" value="password" />

     <!--Number of days to go back to retrieve the user group meetings-->
     <add key="DaysBack" value="900" />

     <!--Number of days to go next to retrieve the user group meetings-->
     <add key="DaysNext" value="300" />

     <!--User group ID-->
     <add key="UserGroupID" value="12198" />

  </appSettings>
>By the way, to read this value use ConfigurationSettings.AppSettings("thekey") method.

Then, I put this in the aspx page that need to get the value:
      ' Web Service authentication
      lcUsername = ConfigurationSettings.AppSettings("Username")
      lcPassword = ConfigurationSettings.AppSettings("Password")

      ' Number of days to go back to retrieve the user group meetings
      lnDaysBack = Val(ConfigurationSettings.AppSettings("DaysBack"))

      ' Number of days to go next to retrieve the user group meetings
      lnDaysNext = Val(ConfigurationSettings.AppSettings("DaysNext"))

      ' User group ID
      lnUserGroupID = Val(ConfigurationSettings.AppSettings("UserGroupID"))
The value I get for each value is blank.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform