Use a Web Part Query String as a URL

When you create a web part from a view, you determine whether or not the web part will display the main grid toolbar for the view and the View Filter section. The options you choose are stored in a query string as part of the *.dwp file that is generated for the web part. The query string is found within the ContentLink section of the *dwp file. Here is an example, with the query string portion in bold text:

<ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/PageViewer">http://server-xyz:60500/ViewWindow.aspx?ViewId=850&amp;IsHideToolbar=false&amp;IsHideViewFilter=true</ContentLink>

With a few minor changes, you can take the query string and use it directly in a browser to run the view. You also can make adjustments to the syntax that controls the display of the toolbar, name of the view and image above the grid, View Filter section, and view explorer. The adjusted URL also could be emailed to other users, and they could run the view using the URL in the email.

See also Create a Web Part from a View and Passing Parameters into Views via URL's.

Note: Web parts also can be imported into a Microsoft SharePoint environment or stand-alone SharePoint Services pages.

Example 1

Here's an example of a query string for a web part where the user opted to display the toolbar and view filter section.

http://server-xyz:60500/ViewWindow.aspx?ViewId=17&amp;IsHideToolbar=false&amp;IsHideViewFilter=false

To use this query string as a URL for running the view, we needed to change each instance of "&amp;" to "&". We left the IsHideToolbar and IsHideViewFilter syntax set to False, which means the toolbar and View Filter will display when the view runs.

http://server-xyz:60500/ViewWindow.aspx?ViewId=17&IsHideToolbar=false&IsHideViewFilter=false

Query strings will run the view with the top frame and left panel hidden. If you prefer they be displayed, change the ViewWindow.aspx in the query string to Default.aspx.

Example 2

Here is an example of a query string for a web part where the user opted to display the toolbar and hide the view filter section.

http://server-xyz:60500/ViewWindow.aspx?ViewId=850&amp;IsHideToolbar=false&amp;IsHideViewFilter=true

To use this query string as a URL for running the view, we needed to change each instance of "&amp;" to "&". We left the IsHideToolbar set to False so the toolbar would still display. We changed the IsHideViewFilter syntax from True to False so it would display as well.

http://server-xyz:60500/ViewWindow.aspx?ViewId=850&IsHideToolbar=false&IsHideViewFilter=false

Query strings will run the view with the top frame and left panel hidden. If you prefer they be displayed, change the ViewWindow.aspx in the query string to Default.aspx.

Syntax to Show or Hide Parts of the View Interface

The following table shows all available syntax for use in controlling the display of different parts of the view interface.

Item

Format & Values

Top frame and left panel

To hide them, use ViewWindow.aspx in the query string

To show them, use Default.aspx in the query string

Grid toolbar

To hide it, use IsHideToolbar=True

To display it, either exclude this syntax from the URL all together or use IsHideToolbar=False

View name above grid

To hide it, use IsHideViewName=True

To display it, either exclude this syntax from the URL all together or use IsHideViewName=False

View image above grid

To hide it, use IsHideViewImage=True

To display it, either exclude this syntax from the URL all together or use IsHideViewImage=False

View Filter section

To hide it, use IsHideViewFilter=True

To display it, either exclude this syntax from the URL all together or use IsHideViewFilter=False

View explorer

To hide it, use IsHideExplorer=True

To display it, either exclude this syntax from the URL all together or use IsHideExplorer=False