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

Home >> Forum >> SharePoint >> Post New QuestionBookmark and Share Subscribe to Forum

Reading the contents of Telerik editor web part which is added in MOSS 2007 web part page

Posted By: Aruna     Posted Date: March 04, 2013    Points:5   Category :SharePoint

We have used Telerik RAD Editor web part in MOSS 2007.

i want to read the contents of the telerik(similar to CEWP) web part and add it to the content editor web part as we want to migrate it to sp 2010 environment with out telerik controls.

i have used SPLimitedWebPartManager to access the page and read the title of the web part. i was unable to read its contents as similar to CEWP.

how i could achieve it. My code sample is
using (SPWeb web = site.OpenWeb())
SPFile f = web.GetFile("/Pages/Default.aspx");
string cou = f.CheckOutStatus.ToString();
if (cou == "None")
SPLimitedWebPartManager wpm = f.GetLimitedWebPartManager(PersonalizationScope.Shared);
using (SPWeb wpWeb = wpm.Web)
foreach (System.Web.UI.WebControls.WebParts.WebPart wp in wpm.WebParts)
if (Equals(wp.GetType().Name, "RadEditorWebPart"))
int cnt = wpm.WebParts.Count;
// System.Web.UI.WebControls.WebParts.WebPart webPart = wpm.WebParts["WebPart_6BC2363F-C1C2-4FF7-93C4-6A3BD4A56B90"];
string webPartTitle = wp.Title;
// wpm.DeleteWebPart(wp);
ContentEditorWebPart cwp = new ContentEditorWebPart();
cwp.Title = webPartTitle;
cwp.ChromeType = PartChromeType.TitleOnly;
wpm.AddWebPart(cwp, "TopZone", 1);
f.CheckIn("CEWP Web part is added");
f.Publish("Added Web Part");
Console.WriteLine("Webpart added");


No response found. Be the first to respond this post
Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

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