0

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?

Ovi
  • 2,459
  • 9
  • 50
  • 72
  • Please elaborate on what you mean by "text". If it is for button, labels, etc then consider using resource files. – NoviceProgrammer Jul 08 '11 at 13:48
  • yes that is exactly what i mean, how do i use resource files? i am new to c#, so ill appreciate your help. – Ovi Jul 08 '11 at 13:53

2 Answers2

1

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

Simon Halsey
  • 5,459
  • 1
  • 21
  • 32
0

I would be tempted to keep your solution 'un-compiled' and then use resource files.

Exitos
  • 29,230
  • 38
  • 123
  • 178