How to Delete a Post

Topics: Business Logic Layer, Controls
May 30, 2008 at 12:11 AM
Hello, first time poster here.  I am very impressed with BlogEngine 1.3,  I just downloaded it yesterday and modified the web version to use SQL*Server..everything seems to be working except I cannot delete a post.  The delete link is there, I am logged in as admin, the post was created by admin but nothing happens when I click the link,  the status line indicates the link is calling a javascript:void(0) this related to using SQL Server instead of XML for the datastore?
May 30, 2008 at 1:33 AM

Hi Vicky,

If you have Visual Studio 2005 or later version, you can open the project and perform debugging locally. You can focus on the following files when debugging this problem:

  1. PostViewBase.cs, this is where the Delete link is planted
  2. BlogBasePage.cs, on the OnPreInit() method you can see a Delete action there
  3. MSSQLBlogProvider.cs, you can focus on DeletePost() method

This is assuming that you are a .NET developer. I myself haven't tried the SQL server version of BlogEngine.NET. However, I made a small modification of BlogEngine.NET that I later named it MultiLangBlogEngine. In MultiLangBlogEngine, I totally rewrote the SQL server implementation. There's nothing wrong with the original implementation, however I'd prefer to use stored procedure than raw SQL command text.

Agus Suhanto


May 30, 2008 at 5:13 PM

Thanks Agus,  I have  Studio Express and have just been coming up to speed on .Net after years of doing ASP Classic.  Also I use VB not C#, so the code isn't the easiest for me to follow yet.  I much prefer the structured DAL approach using Stored Procedures as you suggest,  would your code make it into a future BlogEngine Release? 

Thank you for the hints on where to start debugging...I'll give it a try.


May 31, 2008 at 6:45 AM

Not in the future of BlogEngine release for sure, 'cause I'm not part of the team. However, as I told you before I made a modification of BlogEngine with main capability to serve the content in multi language choice. I've already used it in my blog, however I haven't released it to public yet. There are some concurrency issues that I must test using Load Testing feature of VS 2008. You know, BlogEngine.NET heavily uses singleton as shared resources. I think this shared resources should be given more protection other than the singleton's critical section pattern. So, I have to put attention to this additional protection layer by testing them.

Agus Suhanto