Create a resource on asp.net

it’s best to create one resource for each asp.net page application. or create a global resource for all pages? my application has about 100 pages and 200 user controls. if I want to create a global resource, can I use this function of the visual studio, which allows us to automatically generate a resource file from each page as follows:

From Microsoft:

1) Open the page for which you want to create a resource file.

2) Go to the design view.

3) In the Tools menu, select Create Local Resource.

Thank you for the attention:). Edition: Does Sharepoint only have one resource file ?!

+3
source share
2 answers

I see that most applications are split between 2. Things that are returned on most pages, such as OK, Cancel, Address, First Name ... go global. Specific terms are included in local resources.

, , , . , translationkey, . Cache, , . , , ( , ).

- :

public class TranslationLabel : Label, ITranslation
{
    public string TranslationKey { get; set; }
}

basePage , ITranslation. TranslationKey , Cache.

:

<cl:TranslationLabel runat="server" TranslationKey="WarningMessage" />
+2

, . .

:

, , ...,

+1

Source: https://habr.com/ru/post/1756903/


All Articles