Sharepoint

Disappearing page title of Webpart page in Sharepoint 2010

According to the Microsoft website:

SharePoint collaboration software helps simplify business intelligence, content management, search, and sharing for intranet and internet sites.

It is pretty useful for large enterprises which require a collaborative platform (read, team site/portal/workspace) that doesn’t need too much effort for deployment and maintenance. But if you are a software engineer trying to get his hands dirty with the nitty-gritty of things, it can get pretty bad. Like it happened to me:

I’m currently working on a Sharepoint 2010 portal to be deployed within my organization. The requirements demanded that we create custom webparts (read, user controls) for the site to keep maximum control over the content. Things were looking pretty but then this strange bug was discovered in a meeting with the boss. The page title would disappear whenever any link on the page was clicked. The only way to get it back was to reload the page. Baffling!

I traced the source of the error to the fact that this behavior was consistently present whenever any action was performed within an AJAX UpdatePanel. Since most of the webparts were using UpdatePanels, ignoring the issue wasn’t an option. So, how did I fix it?

Googling for the problem gave me some scripts (Javascript and JQuery) at StackOverflow and other sites. But my faith in Microsoft prevented me from using them. And then there was light…

  • I fired up Sharepoint Designer 2010.
  • Opened the Masterpage in Advanced mode.
  • Located the <title> tag. It contained an <asp:ContentPlaceHolder> tag.
  • Now, I removed any spaces between the <title> and </title> tags. That means, the title tag started and ended in the same line.
  • Save and Publish.

Voila! Problem solved.

Advertisements

4 thoughts on “Disappearing page title of Webpart page in Sharepoint 2010

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s