This project is read-only.

Update Panel and BlogEngine.NET

Topics: ASP.NET 2.0
May 30, 2008 at 1:59 PM

Is anyone using the ASP.NET Update Panel with BlogEngine.NET? I need to do partial page updates, and it is not working properly.

Is this a known issue? Anyone know how I can accomplish AJAX style partial page updates within the BlogEngine.NET framework?

I'm using Visual Studio 2005.

Any feedback will be appreciated. Thanks in advance.

May 30, 2008 at 5:35 PM
I did it while back, take a look if you are interested:
May 30, 2008 at 10:13 PM

rtur wrote:
I did it while back, take a look if you are interested:

Thank you for responding. I now see what I was doing incorrectly and I'll outline it below so that others don't do it.

My BlogEngine blog is set up as an application subdirectory of my main web application. I was incorrectly relying on the web.config file from the main application to manage the AJAX functionality for my blog application in the blog application subdirectory. After copying the appropriate lines from the root level application web.config into the web.config in my blog subdirectory, everything worked fine.

Thank you again for responding so quickly.
May 31, 2008 at 4:12 AM

Getting a different error now.

My update panel works fine as long as I don't click on any of the links on the page not associated with the update panel.

If I load my page in the browser, I can repeatedly click on any of the controls related to the update panel and everything works fine. But once I click on a link that is not related to my update panel, and then click on a control that is related to the panel a couple of times, I get the following error:

 <i>Sys.WebForms.PageRequestManagerServererrorException: An unknown error occured while processing the request on the server. The status code returned from the server was: 500 (and sometimes 404)</i>

This also happens when I remove all of my update panel code and use only the code from the blog post at

I was able to find a few suggestions on various sites. None of them worked.

Is anyone aware of this error with BlogEngine and any workaround?

Thanks in advance.
Jun 3, 2008 at 1:37 PM
I'm currently using a Poll system that someone made.  I've changed it a fair amount, but it still uses an UpdatePanel.  However, a ScriptManager is required before the panel.  I'm not quite sure what that's for (its on my 'to read into' list), but maybe sticking one of those in will help your problem (just a <asp:ScriptManager id="SM" runat="server" /> ) ?

You can see mine in action here:  Its on the left hand side.  Wooo, publicity.
Jun 4, 2008 at 4:19 AM
Thank you for responding.

I have the script manager on the page. The update panel actually works exactly as coded... until I click on any control not associated with the update panel, i.e., if I click on any link on the page. After doing that, and then clicking on any of the defined triggers for the update panel, I get the error message outlined above.

Any other suggestions will be appreciated.
Jun 4, 2008 at 7:55 AM
Ok so its not the ScriptManager...

I see you've tried it without the UpdatePanel also...  It looks like it could be a security setting on the actual server, or something in the web.config file :S
Jun 4, 2008 at 9:13 AM
I have several other applications where I use the Update Panel. And I've never had a problem until now.

Would you mind sharing the code you wrote to create your poll? I would really appreciate it.

Thanks in advance.
Jun 4, 2008 at 10:06 AM
Sure, no problem.  I can't actually upload to my server at the moment (someone at work has blocked my VPN :( ) but I will upload the source code and give you a link later this evening.  I would give a link to the initial source code I downloaded, but I can't remember (or find) where it was from :P  Besides, it didn't work properly to start with, anyway...
Jun 4, 2008 at 7:22 PM
Here we go, as promised:

Inside is the .ascx file and the .cs code-behind file.  Its fairly easy to understand once you've read through it a bit.
Jun 5, 2008 at 5:32 AM
Thank you for uploading the code. However there is an implementation difference in our code. I'm using triggers to initiate my panel update. And it's when I click on one of these triggers that I get the error. Any other suggestions will be appreciated. Thanks again for uploading the code.
Jun 5, 2008 at 7:53 AM
First off, if you ever facied using that poll, there's an XML file missing in that .zip (if you want it, say so...).

That poll sort of uses triggers.  For example, when you click on one of the option buttons, the vote gets cast and the graph appears.  But that 'trigger' is contained within the update panel.

If you like, you could stick up a .zip of your source code and I'll see what I can find - but I'm just a rookie still.  Mind you, I've had a pretty high success rate in finding problems so far with my site :P