03 Dec 2009
04 May 2011
Link to this post
According to my functionality whenever "Generic Content"(Modules -> Generic Content -> Content Items) is created or updated, i need to find and replace a particular word in it. So that i created a ContentManager Executing Event in global.asax file as follows.
void Application_Start(object sender, EventArgs e)
Telerik.Cms.Engine.ContentManager.Executing += new EventHandler<Telerik.ExecutingEventArgs>(ContentManager_Executing);
void ContentManager_Executing(object sender, Telerik.ExecutingEventArgs e)
if (sender is Telerik.Cms.Engine.Data.Providers.DefaultProvider)
if (e.CommandName == "CreateContent" || e.CommandName == "UpdateContent")
Telerik.Cms.Engine.IContent libraryItem = e.CommandArguments as Telerik.Cms.Engine.IContent;
if (libraryItem != null)
libraryItem.Content = libraryItem.Content.ToString().Replace("xxxx", "yyyyyy");
After creating a new content in "view screen" the text get replaced, but when i am trying to edit it the old text which i created is appearing. How to overcome this issue.
Thanks in advance.