Hi,
I wish to create my own blog website but the problem is i still am confused about how it is done.
I would like to use ASP.NET and C#.net to create the website and HTML & CSS to design the website.
The main issue is can i store the blog details (posts) in XML file? or should i use some tool which can create interface between my webpage and the blog server like blogger & wordpress?
It would be very helpful if someone could just explain how this blogging works and how can one create his own blog website without using those templates available online?
priyam1309 0 Newbie Poster
Dani AI
Generated
— good question, and thanks to for getting the thread started. Below is a compact, practical roadmap and a few concrete examples to move from “confused” to a working personal blog using C#/ASP.NET and HTML/CSS.
Start small, pick an approach, then iterate. Three realistic paths:
- Static files (Markdown stored in the repo, rendered to HTML): simplest to host and backup, great for a personal blog with few edits.
- Lightweight custom ASP.NET site: a small app that serves posts, has an admin area, and uses an ORM for persistence — good balance of control and features.
- Headless/CMS-backed site: use a service or self-hosted CMS for editing while your ASP.NET front end consumes an API — least work for features.
A minimal data model to get going (store Markdown or sanitized HTML in Body):
public class Post
{
public int Id { get; set; }
public string Title { get; set; }
public string Slug { get; set; } // url-friendly
public string Body { get; set; } // markdown or html
public string AuthorId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public bool Published { get; set; }
} Practical first milestones: scaffold a small project (Razor Pages or MVC), implement Create/Edit/List views, add authentication for the admin area, render Markdown to HTML (or use a WYSIWYG editor), add pagination and an RSS feed, and implement basic search or tags. Store images either in a folder or as blobs depending on hosting.
Important cautions and resources: always sanitize user-supplied HTML, use anti-forgery tokens on forms, and schedule regular backups. For modern guidance and examples, see the official ASP.NET and EF docs and OWASP security guidance:
- ASP.NET Core overview (documentation): https://learn.microsoft.com/en-us/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-7.0
- Entity Framework Core docs: https://learn.microsoft.com/en-us/ef/core/
- OWASP Top Ten (security reminders): https://owasp.org/www-project-top-ten/
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
priyam,
While I'm sure it's possible to store blog posts and user details and what have you in an XML file... I wouldn't advise it. The more posts and replies and such that you end up with the larger the file will get and eventually it would reach a point where it would overwhelm system resources on your web host.
What you'd be looking for would be a database driven solution. Many hosting providers will give you a MySQL database for free (some even include an MSSQL database for free) which you can set up to contain all of your posts/replies/users/etc.
Calling information from a relational database is much less resource intensive than trying to locate information from an ever expanding flat file (like an XML file) and if you're using C#/ASP.Net for your code-behind the database connection and information management is very easily accomplished if you've had any training/education in how to code for those.
If, on the other hand, you are looking to use a 3rd party blog service to drive your site then you will need to check with those services as to the methods they require/recommend for connecting to and manipulating the data to/from their service (you had mentioned blogger/wordpress).
Hope this helps :twisted: Please remember to mark your thread solved once the issue is resolved.
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.