T
T
TimeCoder2017-10-22 17:21:05
ASP.NET
TimeCoder, 2017-10-22 17:21:05

ASP.net MVC: how to optimally use a database for a landing site?

Hello everyone,
a question about a simple site (landing page type, i.e. dedicated to the sale of a product, there are 5-7 pages of the index, download, faq, contact type). Written in asp.net.
The situation is this: since it is necessary to store download statistics, support multilingualism, and in the future maybe something else, I decided to use a database. It turns out that the part common to all pages (head and footer) goes to the Layout, and only the content of the page itself remains in the View. Everything would be fine, but there is one thing.
Some pages contain a unique header or footer. For example, the page contains a "carousel" (while others do not), and this script is connected to the head (and some script blocks are also executed in the footer). The layout was sent to me by the designer, I did not do it myself, the task is to attach it to the back-end.
I see the following options:
1. Move all these script differences inside the body so that the head and footer of all pages match. I'm not sure if the layout will then work correctly (not just all these scripts at the beginning and end of the file).
2. Use the Razor syntax: "@section", declare these specific things inside the page, but they will actually be rendered where necessary (they will be picked up in Layout). Minus: then how will the site admin edit the pages later? There will not be pure html, but a mixture with Razor.
Maybe you don't need to use a database for a site of 5 pages at all? But if it should be in 5 languages ​​- how then? And where to save statistics, logs - to files on disks?
I have never worked with such mini-sites before, please share your experience!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question