User632277935 posted
Roy and Sathish - Thanks for the links but I think i have a fair understand of what resource files are used for and how to use them.
My question is whether I can dynamically choose which resource file the values are coming from
i.e. CompanyA.resx or CompanyB.resx... and I'd ilke to do this in ASPX files.
<%$Resources:CompanyA USDSymbolCaption%>
<%$Resources:CompanyB USDSymbolCaption%>
To reclarify my question:
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?