I want to populate all the label text of my application from back end. I have an estimation of 60 labels per page. Is it better to save all the data in the form of a dictionary and and move it to the view or should I create a variable for each of this labels and bind them in the Model and pass as an object.

Which one is better in terms of speed and memory usage?

EDIT 1:

I'm refraining from using resx, since there would be frequent changes in the labels and I don't want to republish the code frequently.

1 Answers

1
Skrface On

In your case, one of the best practices is to use resource files (.resx) and take advantage of Globalization and Localization features provided by the framework.

Resource files are sort of dictionary, but you will be able to benefit from a lot more than doing it by yourself.

Hope it helps.