Tuesday, February 15, 2011

How to remove a bad Web Part from SharePoint 2010

More often than I would like, a custom web part I’ve added to a page throws an exception. If you followed my previous blog on “An unexpected error has occurred,” and enabled CallStack, then any unhandled exception will cause the whole page to fail—and there is no obvious way to remove the web part from the page.

Well, there is actually a simple way to remove the offending web part via the Web Part Maintenance page. Simply add a querystring parameter right on the offending page’s URL of “?contents=1".

So I am on a web part page:

image

Append parameter to querystring:

image

You will then be redirected to the appropriate Web Part Page Maintenance:

image

Now you can easily remove the offending web part.

Just to note, if the url of the page you are on already has existing querystring parameters, you should use “&contents=1” instead of “?contents=1”.

2 comments:

  1. the blog is aboutAutomated data lineage documentation using #Dot Net it is useful for students and dot net Developers for more updates on dot net follow the link

    Dot Net Online Training India

    ReplyDelete