Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit default.aspx on SharePoint site without SharePoint Designer

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.

like image 355
Magnus Johansson Avatar asked Jun 05 '09 14:06

Magnus Johansson


People also ask

How do I edit a SharePoint page without designer?

Add a DataFormWebPart and hide the ListFormWebPart. In SharePoint Designer, you can attach a different form to a list as follows: select the appropriate list in the Folder List task pane, right click and select Properties, then Supporting Files. Browse for the form you want to use and apply.

How do I change the default ASPX page in SharePoint 2010?

All you have to do is to right click on the ASPX file in SharePoint Designer, and select Set as Home Page in the menu.

How do I edit ASPX page?

Find the aspx page which you want. Right click the file and choose "Edit File in Advanced Mode". Choose "Edit Page Layout". Then, we can edit it directly, I suggest you adding your code in "PlaceHolderMain".


2 Answers

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

like image 67
Tomso Avatar answered Sep 23 '22 23:09

Tomso


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.

like image 43
Eric Sammann Avatar answered Sep 23 '22 23:09

Eric Sammann