1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Update with eventsmanager

Update with eventsmanager

2 posts, 0 answered
  1. Dave
    Dave avatar
    14 posts
    Registered:
    04 Feb 2009
    29 Mar 2009
    Link to this post
    When creating an event with eventmanager everything works fine.  If I edit the event, instead of updating that event, it just creates another event.  Is there a simple solution for this?  If more info is needed I can post my code.  Thanks.
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    30 Mar 2009
    Link to this post
    Hi Dave,

    Here is an example on how to update events:

    EventsManager manager = new EventsManager("Events"); 
    IContent cnt = manager.Content.GetStagedContent(new Guid("441b6bbf-79b5-463f-926d-4ba48f634d1a")); 
    cnt.Content = "Test edit an event!"
    manager.Content.SaveContent(cnt); 

    If the above does not help, please post your code to investigate it locally.

    Regards,
    Pepi
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
2 posts, 0 answered