My little website runs on asp.net 3.5 and I have not any sql server to host my db.
But some content of the website has to be changeable.
( title of website, copyright – year etc. )
I don’t want to open let’s say “default.aspx” file and change whatever I want.
I should read/write these kind of information to files.
( I’m sure somebody asked that question but I can’t find it )
What is the proper way to do it ? [xml, textfile, config file, or ? ]
Depends on the data you need to store..
If we’re talking about stuff like title, copyright etc, any kind of db is an overkill and a simple config file will do.
However, if you need to store complex data, like a list of your employees, you may need something more sophisticated. There are couple of options: portable db (e.g. SQLite) or maybe some kind of a file-storage. You can store data in a plain text without any special encoding (useful if you want to have editable text (
About me)), or you can use json/xml and stuff like that (if your data is structured, like the list of employees I’ve mentioned earlier).There’s no “universal proper way”, you have to adapt to your specific needs and options (hw/sw).