Adding a separate file for all website content [duplicate]
Thank you in advance for your help.
I have a website in asp.net and c#, i need to have it that all text that is in the site should be taken from a separate file, so it can be changed easily if needed, and for other similar reason.
Hope this id clear.
What is the best way of doing such a thing?
You'll want to read up on resource files, globalisation & localisation. There is a binding expression, similar to <%# that can read the values from the resource files.
This should get you started: http://msdn.microsoft.com/en-gb/library/fw69ke6f.aspx
Simon
I would be tempted to keep your solution 'un-compiled' and then use resource files.
精彩评论