views:

41

answers:

0

We have several companies using one web application. Companies may decide to display different values in Labels.

e.g. CompanyA -> ZipCodeCaption = "Zip Code"

CompanyB -> ZipCodeCaption = "Pin Code"

CompanyA -> USDSymbolCaption = "USD"

CompanyB -> USDSymbolCaption = "$"

Currently, we have different settings saved for different companies in Web.Config->App Settings as key-value pairs. This works okay, but it is very difficult to manage when adding new values.

We'd like to make this more organized by using Global Resource files. i.e. Create one resource file for each company that contains key value pairs. The idea is to then select the resource file on application start based on which company is currently using it.

However, we don't know how to go about doing this. When we want to use a resource file in an ASPX file, we have to give it the name of the resx file which is specific to a single company. <%$Resources:CompanyA USDSymbolCaption%>

Is there a way we can specify which company to get the Captions from in code behind and not have to write the name of the resx file as specified above.

Is there a better way for us to achieve this without using resource files?