How to edit default.aspx on SharePoint site without SharePoint Designer
Asked Answered
H

5

12

On several occations, I have faced the situation that the default.aspx page on a Site doesn't work. More specifically, a reference to a WebPart and/or Control is throwing a error because the assembly is not found. Fine, you just fire up the dreaded SharePoint Designer and remove the dependency line. However, if I wanted to use this method when not having SharePoint Designer, how could this be done?

EDIT: Removing the web part using the "?contents=1" web part management page didn't help in my case. The <%@Register tag was still there and had to be removed using SharePoint Designer.

Hypostyle answered 5/6, 2009 at 14:4 Comment(1)
This seems strange that the default.aspx page wouldn't work... Was the page customized to include a webpart/control? I don't know of any way to edit the page through the regular SharePoint UI but you could probably do this with some C# code.Morel
E
5

Go to view all content of the site (http://yourdmain.sharepoint/sitename/_layouts/viewlsts.aspx). Select the document library "Pages" (the "Pages" library are named based on the language you created the site in. I.E. in norwegian the library is named "Sider"). Download the default.aspx to you computer and fix it (remove the web part and the <%Register tag). Save it and upload it back to the library (remember to check in the file).

EDIT:

ahh.. you are not using a publishing site template. Go to site action -> site settings. Under "site administration" select the menu "content and structure" you should now see your default.aspx page. But you cant do much with it...(delete, copy or move)

workaround: Enable publishing feature to the root web. Add the fixed default.aspx file to the Pages library and change the welcome page to this. Disable the publishing feature (this will delete all other list create from this feature but not the Pages library since one page is in use.). You will now have a new default.aspx page for the root web but the url is changed from sitename/default.aspx to sitename/Pages/default.aspx.

workaround II Use a feature to change the default.aspx file. The solution is explained here: http://wssguy.com/blogs/dan/archive/2008/10/29/how-to-change-the-default-page-of-a-sharepoint-site-using-a-feature.aspx

Enthral answered 7/6, 2009 at 11:38 Comment(3)
Nope, sorry. The default.aspx for the root web is not stored in any Document Library named Pages.Hypostyle
That publishing workaround would probably work for a MOSS setup, but not for SharePoint. And changing the homepage URL is not desired. But thanks so much for your ideas.Hypostyle
@Tomso: Interesting, although it was more work than I hoped for. But your answer is the best so far. Make it an answer instead of a comment, and I will accept it.Hypostyle
A
1

I was able to accomplish editing the default.aspx page by:

  • Opening the site in SharePoint Designer 2013
  • Then clicking 'All Files' to view all of the files,
  • Then right-click -> Edit file in Advanced Mode.

By doing that I was able to remove the tagprefix causing a problem on my page.

Aim answered 19/12, 2014 at 21:44 Comment(0)
T
0

You can always use Sharepoint Solution Generator to create a project and edit in VS2008.

You can find the Generator along with Sharepoint Developer tools.

Tenantry answered 15/6, 2009 at 10:38 Comment(1)
I'm not sure I follow you. How could the Solution Generator help me modify the default.aspx file?Hypostyle
M
0

Or you could just open the page in maintenance mode and delete the offending web part.

Sharepoint 2007 Insight: Remove bad or broken web parts from a page

Misadventure answered 11/2, 2011 at 7:22 Comment(2)
Hi. Please read my post again. That was tried in this case and didn't work.Hypostyle
The link you are provided is no longer working @MisadventurePember
V
0

Easy quick solution which worked for me. 1. Go to the root folder. Copy the default.aspx file. 2. Delete the original file. 3. Rename the copied file to default.aspx.

Its all set to experiment again. Not sure how sharepoint referencing these webparts in that page. But works :)

Vector answered 26/2, 2014 at 21:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.