blog archive contact about feed

Rob's Blog - January 2010

Contents

Here are Rob's Blog entries for January 2010.

Blog entries for other months can be found in the main blog index.

Maintaining The Scroll Position On An ASP.NET Page After Postback

I had a requirement today for an ASP.NET page to jump to the same part of the page once a form was submitted via a postback.

Qudos to my fellow developer Andy Howell for leaping in and pointing out that functionality was already in ASP.NET 2.0 and above, so there would be no need for me to write any funky JavaScript.

You need to set MaintainScrollPositionOnPostback to true. I did this in the Page tag on the ASP.NET page.

<%@ Page MaintainScrollPositionOnPostback="true" %>

Although I've not tested it yet, you should also be able to set it globally in the web.config file in the pages section.

<pages maintainScrollPositionOnPostBack="true" />

Or programmatically in the code behind.

System.Web.UI.Page.MaintainScrollPositionOnPostBack = true;

For more information on this, see the MSDN page for System.Web.UI.Page.MaintainScrollPositionOnPostBack.

Links for 2010-01-16

Bookmarks from del.icio.us
Entered: 2010-01-17 00:15:01

Resetting A PhpBB Admin Password After An Upgrade

While helping upgrade an old phpBB 2 messageboard to phpBB 3 earlier, I needed to reset the admin password.

I was getting tbe error "It was not possible to convert your password when updating this bulletin board’s software." after I'd converted the old user data and tried to login as the admin user.

To reset the admin password to "password" you have to do the following.

  1. Login to your database and look in the phpbb_users table for the admin user.
  2. Set the user_password to "$H$9Ae3Uk.ECdWW5ya13M4ErWhr4c.761/", user_login_attempts to "0" and user_pass_convert="0".

You should now be able to login with your admin username and the password "password". Remember to change this once you are in for security!

Entered: 2010-01-14 11:51:49