Posts Tagged ‘Sharepoint 2010’

Sharepoint: Reserved Keyword id in QueryString

October 27th, 2011

This is a caveat which may save you hours of pulling your hair out and/or banging your head against the wall.

When passing paramaters via the querystring in any sharepoint webpart user control , the term “id” is reserved, and any functionality depending on this querystring parameter will break.

» Read more: Sharepoint: Reserved Keyword id in QueryString

Sharepoint: Maintain Scroll Position on Postback

January 24th, 2011

Problem: Sharepoint does not maintain Scroll Position on Postback

Solution:

Step 1: Navigate to your Default.Master Page in Sharepoint Designer and add the following Line:

<%@ Page Language=”C#” AutoEventWireup=”true” MaintainScrollPositionOnPostback=”true” %>

Step 2: Save and publish your Default.Master Page, you will notice that Sharepoint Designer has modified the above line to something like the following (Depending on your Sharepoint Version):

<%@ Page Language=”C#” AutoEventWireup=”true” MaintainScrollPositionOnPostback=”true” inherits=”Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>

Step 3: Add # anchor tags as per normal HTML to your Web Part Pages and your Scroll Position will be maintained on Postback