I wanted to know if I can set a folder pointer location in a class or some place which can be easily be handled. Can I easily set the location of the images or the content that I am storing in this folder to be managed through these classes, instead of altering the code one by one?
For example, if I move to a cloud tomorrow, I just need to change the pointer in the class and not the entire code of 10 pages and the other way around.
Or in simple words: I am planing to store a bunch of images in C# in folders, but I don’t want to hardcode the location of these folders. I was wondering if i can store the location in a specific class.
You can put some config information like this in your web.config file. Here is part of mine:
Then you can get at these properties like this: