Personal ResourceProvider - how to set connection string / parameters via web.config RRS feed

  • Question

  • User-253199000 posted


    I created my own ResourceProvider (MS SQL) and I want to use it in many of my ASP. NET website projects. I know how to set it in my web.config:

    <globalization uiCulture="en" culture="en-US" resourceProviderFactoryType="Foo.Resources.FooResourceProviderFactory, Foo.Resources"  />

    But in the code of my ResourceProvider classes the connection string name ist hardcoded. Since connection string names differ from web project to web project (even sometimes the name of the SQL table name that contains the localization strings), I wonder if it is possible to pass a parameter via the web.config fo rthe connection string?

    Thanx for help,


    Wednesday, August 13, 2014 8:42 AM


  • User-253199000 posted

    I found out that this best done by creating a ConfigurationSection in the web.config file.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 14, 2014 7:11 AM