You will create a blog post page using ASP.NET MVC. The focus is on demonstrating your fundamental skills in MVC, data handling, and basic front-end development.
- ASP.NET MVC skills
- Routing and controllers
- Basic CSS and responsive layout
- Data retrieval and persistence
- Form input and validation
Develop an MVC view that displays the blog post content, utilising the layout provided in the template.html file.
Move the Blog-Posts.json file to an appropriate location in the project for reading and writing data. Replace the section marked <!--Blog post content-->
with the content from this JSON file.
Load a specific blog post from the JSON file based on its ID, employing MVC routing and the appropriate controller actions. For example: /blog/1/, /blog/2/, /blog/<ID>/, etc.
Display a list of comments related to the blog post, sourced from the JSON file. Add this content to the section marked <!--Blog post comments-->
.
In the section marked <!--Blog post comment form-->
, add a comment form that allows users to submit comments, which will be stored against the relevant blog post item in the Blog-Posts.json file.
Form fields:
- Name (required)
- Email address (required)
- Comment (required)
Implement the functionality to reply to a comment. Save the reply in the appropriate section of the JSON file and display it directly underneath the comment to which the user has responded.