Problems using custom resource provider

Last post 10-23-2008 11:12 AM by bigtower. 1 replies.

Sort Posts:

  • Problems using custom resource provider

    10-23-2008, 9:32 AM
    • Member
      2 point Member
    • bigtower
    • Member since 10-15-2008, 9:59 AM
    • Posts 3

    I have a very simple custom resource provider implementation , which looks like this:

    Public Class XXCustomResourceProviderFactory
        Inherits ResourceProviderFactory
        Public Overrides Function CreateGlobalResourceProvider
            Return New XXCustomResourceProvider(Nothing, classKey)
        End function

    CreateLocalResourceProvider returns nothing, as does the ResourceReader property of XXCustomResourceProvider .

    XXCustomResourceProvider.Getobject() always returns the string "hello world".

    I have registered the XXCustomResourceProviderFactory.dll in the GAC using gacutil, but website which uses this dll does not build ( says its cant find type XXCustomResourceProviderFactory in the assembly ).  My config file does have

    <system.web>

    <globalization resourceProviderFactoryType="XXCustomResourceProviders" ........

    Also, on the control in my aspx page, I use attribute like
    Text="<%$ Resources:XYZ, MorningGreeting %>"

    .  Is this correct?

     

     

  • Re: Problems using custom resource provider

    10-23-2008, 11:12 AM
    • Member
      2 point Member
    • bigtower
    • Member since 10-15-2008, 9:59 AM
    • Posts 3

     

    it seems the type I was using was wrong, it should have been namespace.classname in this line

    <globalization resourceProviderFactoryType = ........

     

     

Page 1 of 1 (2 items)