Welcome to MSDN Blogs Sign in | Join | Help

SharePoint and Querystrings

Recently did a little bit of playing with querystrings (at the end of the URL, that is after the .aspx, put a '?' then the value below, to use more than one use an '&'), thought it might be something other people are interested in. Strange that I haven't really stumbled across these documented anywhere else, it might just be that I haven't been reading the right documents! (I'm sure that if this is the case it will be politely pointed out to me!)

Let me know if you have any others and I will add them to the list.

Querystring Function
Contents=1

This is probably the most useful of querystrings. Using this on any "Web Part Page" will take you to what is called the "Web Part Page Maintenance" page (screenshot below) which allows you to delete web parts from both personal and shared views. This feature is especially useful if you have added a misbehaving web part. In this situation you can find yourself in a "chicken and egg" situation, whereby you can’t access the page to remove the web part because the web part you have added is causing an error on the page.

Note: I have actually come across a situation where even this technique couldn’t remove a misbehaving web part, in this situation FrontPage becomes the only option.

Mode=Edit This flips a "Web Part Page" into edit mode, its the same as clicking on "Edit Page"
Mode=View This flips a "Web Part Page" into view mode, it’s the same as clicking on "View Page"
PageView=Personal Displays your Personal view of a "Web Part Page", this is the same as selecting "Personal View" from the "Modify Shared/My Page" dropdown.
PageView=Shared Displays the Shared view of a web part page, this is the same as selecting “Personal View” from the "Modify Shared/My Page" dropdown.
ToolPaneView=2 Shows the "Add Web Parts" toolpane, allowing you to drag and drop web parts onto a "Web Part Page".
ToolPaneView=3 Shows the "Search" toolpane, letting you search through the web part galleries before adding a web part to the page.

Finally (there is always a finally isn't there?) a couple of things that should be considered:
1. These querystrings *will* respect the underlying SharePoint permissions, so for example, someone without the ability to add web parts will not suddenly be able to by using these querystrings.
2. These will let you add web part to pages that may not have been designed to have web parts added to them, for example the "Sites" page. Be very careful as there are certainly some issues to be discovered, don't try and get too fancy!
3. You use these at your own risk.

Published Monday, October 11, 2004 7:19 PM by danielmcpherson
Filed under: ,

Comments

# re: SharePoint and Querystrings

Tuesday, October 12, 2004 7:18 AM by Colin Walker
If you don't want to start filtering using a Form Web Part then using FilterField / FilterValue pairs is a nice easy route:

?FilterField1={column name}&FilterValue1={required value}

# re: Web Part Page Maintenance

Tuesday, October 26, 2004 8:56 AM by Me Vs SharePoint

# Tie this into the google deskbar

Tuesday, November 02, 2004 4:18 AM by Mullet
Tie this info into the google deskbar

http://stephenmuller.squarespace.com/sharepoint-stuff/

yes Im trying to promote my blog.

# re: SharePoint and Querystrings

Friday, November 05, 2004 1:18 PM by Lippy
Good tip!

# re: SharePoint and Querystrings

Tuesday, November 09, 2004 10:29 AM by amrita
hi
is there a way that if i provide the querystring value,a column in the web part takes that value and stores it when the user is saving data>

# re: SharePoint and Querystrings

Tuesday, November 09, 2004 10:22 AM by amrita
hi
is there a way that if i provide the querystring value,a column in the web part takes that value and stores it when the user is saving data>

# SharePoint querystring tips still work in MOSS 2007

Wednesday, January 24, 2007 12:30 PM by Simon Thorneycroft and Jonathan Hodgson

It's good to see that these SharePoint querystring tricks work on Microsoft Office Server 2007....

# SharePoint 2007: Using the Source Query String Parameter « SharePoint Sherpa

# Adding more funtionaltity to SharePoint with JS funtions « PANVEGAs Blog

# iSea (only for iPod and iTouch users)

Tuesday, December 23, 2008 11:23 AM by iSea (only for iPod and iTouch users)

# iSea (only for iPod and iTouch users)

Tuesday, December 23, 2008 11:24 AM by iSea (only for iPod and iTouch users)

# iSea (only for iPod and iTouch users)

Tuesday, December 23, 2008 11:28 AM by iSea (only for iPod and iTouch users)
New Comments to this post are disabled
 
Page view tracker