Friday, April 16, 2010

Default Web Part

When we create any list or document library, it gets created with few default aspx pages like AllItems.aspx, NewForm.aspx, EditForm.aspx and DispForm.aspx.

I generally preferred to customize these forms or by creating new views.

When we do it, the default web part in these pages is the biggest blocker to perform our work.

If we delete the default web part, god knows or Microsoft knows about the problems you will run into. So, NEVER EVER delete default web part from above pages. Better keep this web part hidden and closed. You can do it in the designer by right-clicking on the web part and go to web part properties. For NewForm.aspx and other aspx pages, we will see Edit Page link under Site Settings is disabled. Also, you are not allowed to user designer to remove/close/hide the web part when the application is in DEV/TEST/Production servers.

So, what is the alternative?

For the above pages, append "contents=1" at the end of the url.

Note: If the url has no parameters, then add "?contents=1". If the url has # at the end, then delete the character "#" and then add "&contents=1".

I ran into this issue during my deployment of sharepoint application.