More in this section

Forums / Developing with Sitefinity / submit events from front end

submit events from front end

2 posts, 0 answered
  1. Rabindra
    Rabindra avatar
    106 posts
    17 May 2009
    05 Aug 2009
    Link to this post
    I need to setup a page where I can submit events from front end.
    An email notification should be emailed to the page manager of that page once submitted.

    Any help is appreciated.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    06 Aug 2009
    Link to this post
    Hi Rabindra,

    You can create a custom user control that you should use in desired page. In  the control designer you should add several RadTexBox and DateTimePicker controls( or other appropriate for you r needs controls) that will be used for entering the data for an event ( Name, Publication and Expiration Date, Subject). You should have a button control, when pressed the data will be persisted.

    Below is a sample code.

    // instance of content manager 
    Telerik.Cms.Engine.ContentManager contentManager = new Telerik.Cms.Engine.ContentManager("Events"); 
    // create a new content item - an event 
    Telerik.Cms.Engine.IContent newContent = contentManager.CreateContent("text/html"); 
    //set the text from a text box control as a content of our item 
    newContent.Content = Textbox1.Text; 
    // set meta keys for the content item 
    newContent.SetMetaData("Name", TextBox2.Text); 

    You can add the logic above to button click event.
    For sending an email you can use MailMessage Class

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered