Sometimes I need to set some string values from code, for example:
Page.Title = "This is a test page.";
or
lblSupportInfo.Text = "Please contact xxx-xxx-xxxx for support.";
These are just examples of data that can change anytime. Is it better stored in the settings file in application scope? What are other options.
It would be better to be able to change this by updating a configuration file rather than a code release (Resources).
How do other people handle this? If there are too many of them, the web.config can be very long.
i did this in asp.net 2.0, so things might have changed since then, but the best way to do this is to store it in the database, and then use the asp.net resource provider to load the values.
So to your application it would look like its loading from a resource file, but it would from the database, and you get all the nice compile time benefits and built in asp.net tooling for resources and you can change your locale if you need to.
this article was the inspiration for the solution http://msdn.microsoft.com/en-us/library/aa905797.aspx