How To Create AJAX-enabled SharePoint Web Part with UpdatePanel and UpdateProgress in 10 minutes

In this post I am going to show you how you can setup your SharePoint site to support Microsoft ASP.NET AJAX framework and create a basic AJAX-enabled SharePoint Web Part. You can find many great articles on MSDN on how to do these and they explained in more details, but if you are looking for a way to get it up and running in 10 minutes, this is it.

James Tsai .NET SharePoint Blog - AJAX enabled webpart 

James Tsai .Net SharePoint Blog - AJAX enabled webpart updating

An AJAX-enabled web part with update button and display current time every time when button is clicked. Loading image and text displayed during the update.


  • Enabling SharePoint site with ASP.NET AJAX framework support
  • Create AJAX-enabled SharePoint web part
    • with UpdateProgress control for visual feedback in browser when web part is updating
    • with AJAX request event script to hide UpdatePanel while web part is updating
  • Add AJAX-enabled web part to page and see it in action



How to change SharePoint Calendar default start hour and end hour of Day View

Default Day View of SharePoint Calendar control has its start hour set to 7am and end hour to 5pm.

James Tsai .Net SharePoint Blog - Default Day View Start Hour

To change this you'll need to update SPRegionalSettings.WorkDayStartHour and SPRegionalSettings.WorkDayEndtHour properties. And it is not something you can do from UI.

For example, to change start hour to 6am and end hour to 6pm you'll have to write and run this code

using (SPSite site = new SPSite("http://<YourSiteUrl>"))
    using (SPWeb web = site.RootWeb)
        SPRegionalSettings regionalSettings = web.RegionalSettings;
        regionalSettings.WorkDayStartHour = 360;
        regionalSettings.WorkDayEndHour = 1080;


The possible values you can set for WorkDayStartHour and WorkDayEndHour are 60 x (hour value in 24 hour format).

Basically, they are total number of minutes. For example,

6am = 6 x 60 = 360

6pm = 18 x 60 = 1080

9pm = 21 x 60 = 1260 and so on..

As you can see, the start hour of Day View in calendar has now changed

James Tsai .Net SharePoint Blog - Changed Day View Start Hour

Hope it helps



How to use SharePoint Delegate Control to change the navigate URL of Manage Links (My Links)

Microsoft Office Online -

By using the My Links menu, you can easily add new links, reorganize your links, access sites where you are a member, and click links to save them to you My Links list.

You can use this feature when you have "My Site" setup and running in your SharePoint Shared Services.

James Tsai .NET SharePoint Blog - My Links Manage Links menu control


Let's say you have following two site collections setup for your SharePoint intranet site and My Site.

Intranet - http://intranet/

My Site - http://mysite/

When user is accessing manage links page by clicking on My Links, Manage Links menu on Intranet site, the menu control redirects user to


And you probably don't want this to happen, because of following reasons

  • You want to hide My Site from user, but you still want to use My Links feature.
  • You don't want user to navigate away from current site collection when they clicked on the Manage Links menu.
  • You want MyQuickLinks.aspx page to inherit and use current site theme.
  • You are experiencing the MOSS SP1 bug I described in last post.
  • OR you just want to customize it to navigate to the any URL


The goal here is obvious. To customize the navigate URL of Manage Links. In the example above, user should be redirected to



You'll need following three things to achieve the goal



Unknown Error - Manage Links of My Links

Do you get "Unknown Error" page when you try to access "Manage Links" page from "My Links"? Don't panic.

Many people experienced the same problem after Microsoft Office SharePoint Server SP1 update. The problem was confirmed by Microsoft and hotfix for it has been around for awhile (KB 952294).

Microsoft Help and Support:

You do not have the Create Personal Site permissions in SharePoint Server 2007 Service Pack 1. When you click the Manage Links link, you may receive the following error message:

An unknown error has occurred.

If you are looking for a quick fix, I recommend you go view and request hotfix package from Microsoft. But if you really want to customize Manage Links redirecting URL, in next post I'll show you how to do it without making any changes to master page.

Watch this space