.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Cloning/Moving webpart pages with existing webparts

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :SharePoint

Hi All,       

        We need to support clone/move of the webpart pages with pre populated webparts. We have our custom webpart page layout. Users can create webpart page using our custom page layout and can add webparts init. On cloning of the webpart page we just read the file(webpart page) from the document libary and saving it with different name in the same document library. But the cloned page does not retain the webparts added to it. The user can view only the empty webpart page layout.

Please suggest me how to move/clone the webpart page with the existing webparts.



View Complete Post

More Related Resource Links

How to create Webpart pages dynamically ?


Hello friends,

I need to programatically  create a webpart page on my sharepoint sit on the activation of a feature and after creation of that page, i need to add a webpart. How i will do that? Is it possible create a Webpart page dynamically?


How to change the order of Webparts in Sharepoint 2010 wiki pages

In WSS you change the order of webparts just by moving them above or below another webpart. This does not work any longer in SP 2010. I want to move a list webpart above another list webpart. How can I do it [SP2010 Foundation].

Error: Access Denied on default.aspx and other pages of existing and new sites

Hi, since today we can't access the project portals of all our projects (Visual Studio TFS 2008/sharepoint admin 3.0 running on esx 4.0). I already checked every possible security settings, they're all OK. I also tried creating a new site but I can't access the site. I can however access all the settings. For example when I try to access: http://server/Sites/Profel I get the "Error: Access Denied" message and the browser is redirected to http://server/Sites/Profel/_layouts/AccessDenied.aspx?Source=http%3A%2F%2Fserver%2FSites%2FProfel%2Fdefault%2Easpx I have no problem navigating to: http://server/sites/Profel/_layouts/settings.aspx and I can go to al lot of pages, but when I want to create something like a calendar I can specify the parameters but when I click the create button I get the same error. http://server/Sites/Profel/_layouts/AccessDenied.aspx?Source=http%3A%2F%2Fserver%2FSites%2FProfel%2FLists%2Ftest%2Fcalendar%2Easpx&Type=list&name=%7B46CB3B46%2DD0F6%2D47F5%2DBA1A%2D3C9654A24A8E%7D I already tried this: http://support.microsoft.com/kb/926642  http://support.microsoft.com/kb/896861/en-us but no success Any help is welcome, Greetz, Peter

Custom Webpart not working on "My Profile" page but works on all other pages. Linq Problem?

Hi, I created a publication site and in that site i created pages with specifique metadata (using a pagelayout with a custom content type)0. My webpart is getting data from those pages and displaying it. My webpart works on every page except on the "my profile" page(overview tab). I get the following error: Invalid Url: /TestSites/course I used the SPMETAL to create a class and i'm using this class to retrieve the data from the pages (with linq). The url i give to the entity is http://pcp/TestSites/course  this works fine on every site except on the my profile page. Can anybody help me? Here is the code i use to retrieve my data: EntitiesDataContext ctx = new EntitiesDataContext(courseSite); //Code below gets only the pages with a courses contentType. //EXCEPTION TRIGGERT ON THE FOLLOWING LINE IF IN PROFILE PAGE EntityList<Courses> course = ctx.GetList<Courses>("Pages"); //Writing the query to get the correct pages(with the course page layout only! var Query = from myCourse in course.ToList() where myCourse.CourseParticipants.Contains(myWeb.CurrentUser.LoginName) Select new{myTitle = myCourse.CourseTitle, myCompany = myCourse.Company, myPath = myCourse.Path, myName = myCourse.Name }; Thx.    

Webpart on multiple pages


I'm trying to have a webpart displayed on multiple pages. However, this webpart gets different data based on what is in the URL, so the situation explained in this link http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/5d0672ad-9b39-40b8-a60c-bfcb9e6895b7/ will not work. Is there any way to say, create a template or something and drop my webpart in it, and have the webpart "know" what is in the query string, and display its data accordingly? I tried altering the WebPartPage.aspx file in SP Designer with no luck; I couldn't figure out how to get the aforementioned webpart in there.


Thanks for any help or ideas to try. Appreciate your time.

How to make a textbox or a label in my own webpart connectable with webparts from sharepoint webpart

I'm developing a webpart which need to be able to receive data from standard webparts from sharepoint.
My webpart needs to get data from a sharepoint formfield in an editform from a list.
I know how to connect 2 standard sharepoint webparts with sharepoint designer. But I can't seem to figure out how to connect my own webpart with a webpart from sharepoint. All I can find on the internet are examples where you need to have your own provider and consumer, not just the consumer.
So basicly I need my webpart to be able to connect with sharepoint webparts, just one connection is enough.

I'm developing for sharepoint 2007 with visual studion 2008. 

Updating the page formatting on existing pages.


Hi All

I moved the Quick Launch bar to the bottom of our intranet (MOSS 2k7). I created a custom master page and applied it to all the existing sites.

My issue now is that all the existing sites have a large blank space where the quick launch was. I need a way to resize TitleAreaImageCell and LeftNavigationAreaCell without opening every page. Do i have to update the site definition? or create a custom site definition and apply it?

Thanks, Ten

Problem with adding third party webparts and sharepoint webparts to the custom pages


Hi All,


 I have a problem with my custom webpart pages which are inside sitedefinition. I have a sitedefinition defined for creating sites and sitedefinition contains the master pages and .aspx pages. My pages have webpartzone defined to with the custom webparts added in it. From the browser, when I try to add third party webparts or sharepoint webparts or my custom webparts, it's failing with "Unable to add selected web part(s). The operation could not be completed because the Web Part was deleted by another user or is invalid." Does anyone have the same problem? Please help me. Why the pages are not allowing to add any other webparts to the page. Also I double checked my pages and webpartzones if I am blocking to add webparts via AllowCustomizations=false but I am not. If I create a site with the sitedefinition, isn't it possible to add webparts to the page manually? I haven't found any information about this. Any ideas please.


Thanks in advance,


mapping webpart control with lookup column on pages library


I have created two look up column in my pages library mapping with two list say c1 and c2.In the front end I  have added a webpart which renders a treeview and display the content of c1 and c2 list.
Now when the user select or modify any option in the tree view and publish the page then the values selcted should be updated in look up columns created in library.

I wrote the updated and updating event handler but in that I am unable to get the treeview control.

So can any one tell how can I map the selection in treeview to the look up column created in pages library

Moving Web Part Pages with Content Editor Web Parts


In our MOSS 2007 application, we were moving a document library from one site to another (on the same site collection).  In the library, there were several web part pages (.aspx) that contained Content Editor Web Parts.

The pages were copied (using Manage Content and Structure) and they contained the Content Editor Web Parts.After the move, but all of the Content Editor Web Parts were blank.  I thought that the content was saved on the page but it looks like I was mistaken.

Is there a way to move these Web Part Pages while preserving the Content Editor Web Parts?


How to UPdate the existing JQuery assigned to Content Editor WebPart?


Hello All,

I have a CEWP with Javascript assigend to it..how to modify the script assigned to?


High Performance ASP.NET - Speeding Up ASP.NET Pages

have been writing a series of blog posts, which I have named High Performance ASP.NET Websites Made Easy! There is no rhyme or reason to the order of these posts and certainly can be read in any order:

Developing High Performance and Scalable ASP.NET Websites
Avoid Chatty Interfaces Between the Tiers in Your ASP.NET Web Application
ASP.NET Page Profiling - Page Tracing - High Performance and Scalable ASP.NET Websites Made Easy
Web Applications: N-Tier vs. N-Layer - Benefits and Trade-Offs
Query Analyzer - Sql Server Database Indexes and Execution Plans

SharePoint Application and Site Pages - Part 1 of 2

In this first part of the two part series, Steven covers the differences between Site and Application pages in SharePoint 2007, why each may be used in various circumstances, and prepares for the construction of a menu located application page. After a brief introduction he examines the concept of Site Pages and Application Pages separately in detail with supported screenshots.

SharePoint Application and Site Pages - Part 2 of 2

As the second article in a two part series, Steven examines the attributes and details of a SharePoint 2007 application page, including the construction and feature deployment of the same page based project. Since this is a WSS level objective, as opposed to MOSS, you will not need MOSS to work with the code included in this project. Windows Server 2003, WSS, and Visual Studio 2005 are all that is needed, with no additional add-ons. He provides a detailed analysis of each step involved in the creation and deployment of the project.

Application Vs. Content Pages in SharePoint

SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Write Custom WebParts for SharePoint 2007

The popularity of SharePoint Portal Server 2003 led Microsoft to tightly integrate the next SharePoint version, Microsoft Office SharePoint Server (MOSS) 2007, with its ASP.NET 2.0 WebPart framework. This tight integration enables the ASP.NET and SharePoint developer to do a number of things that previously weren't possible

Master Pages in MOSS 2007

'MasterPages' feature in sharepoint 2007 makes the entire customization job easy.In 2003 we used to face lot of issues to get the same look and feel and the standard behaviour for overall site. In 2007, customizing the look and feel for the entire site can be done in a simple way by using 'MasterPage' feature.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend