Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Asp.Net Custom Resource Provider : non-updatable build

$
0
0

In my asp.net web site i'm using customized resource provider to fetch local resource information from database,

<globalization resourceProviderFactoryType="MyCustomResourceProvider" culture="en-US" uiCulture="en-US">

It is working fine while i debug from visual studio or publish using "precompile site to beupdatable" mode set to true. But when i change the "updatable" mode tofalse, it is not hitting my custom resource provider for any page,.

When i explored the generated assembly, i found that code for fetching local resources has not been generated, somehow aspnet_compiler.exe  is not adding the required code if i use custom resource provider.

Compiler Generated Code
[DebuggerNonUserCode]
private Button __BuildControlButton1()
{
    Button button = new Button();
    base.Button1 = button;
    button.ApplyStyleSheetSkin(this);
    button.ID = "Button1";
    // Not generated code starts   
    // This code gets generated if i have App_LocalResources folder, file & Key  in my folder structure  but not with custom resource provider in non-updatable build   
      button.Text = Convert.ToString(base.GetLocalResourceObject("Button1Resource1.Text"), CultureInfo.CurrentCulture);
    // Not generated code ends
    return button;
}

 Something to do with "aspnet_compiler.exe" ?


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>