Rank: Member
Joined: 6/9/2008(UTC) Posts: 4
|
For example, I want to create a key called TrialKeyServer. I want to access it in my program like WebAppSettings.TrailKeyServer.
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
Just set it in your code. The system will create an entry in the database if one doesn't exists already.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
FromPAUS,
If you need to access the value using dot notation, WebAppSettings.TrailKeyServer, you will need to add a property to the WebAppSettings class. Generally this is not necessary since you can use the GetXXX functions to retrieve a value and the Update() and Save() functions to save and update the value. These functions support name/value pairs. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 3/30/2009(UTC) Posts: 4
|
Originally Posted by: "Aaron" FromPAUS,
If you need to access the value using dot notation, WebAppSettings.TrailKeyServer, you will need to add a property to the WebAppSettings class. Generally this is not necessary since you can use the GetXXX functions to retrieve a value and the Update() and Save() functions to save and update the value. These functions support name/value pairs. Aaron How I can add properties to the class WebAppSettings?. This class is inside to a DLL file and which are the functions GetXXX, you can give me an example please. Thank You Firmo
|
|
|
|
Rank: Member
Joined: 9/26/2008(UTC) Posts: 121
|
Generally if you defenetly want to have TrailKeyServer property in WebAppSettings class you need to recompile the core. But you can add such property to any other class to work with it like with WebAppSettings. The sample code is below: Code: [color=#0000ff][color=#0000ff][2] Public[/color][color=#000000] [/color][color=#0000ff]Shared[/color][color=#000000] [/color][color=#0000ff]Property[/color][color=#000000] TrailKeyServer() [/color][color=#0000ff]As[/color][color=#000000] [/color][color=#0000ff]String [/color][color=#0000ff]Get</P>[/color][color=#0000ff]Return[/color][color=#800000]"TrailKeyServer"[/color][color=#0000ff]End[/color][color=#0000ff]Get</P>[/color][color=#0000ff]Set[/color][color=#0000ff]ByVal[/color][color=#0000ff]As[/color][color=#0000ff]String[/color][color=#800000]"TrailKeyServer"[/color][color=#0000ff]End[/color][color=#0000ff]Set</P>[/color][color=#0000ff]End[/color][color=#0000ff]Property</P>[/color][/2][/color]
and do not forget to include [2]BVSoftware.Bvc5.Core namespace[/2]
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.