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

Forums / Developing with Sitefinity / Get Inserted comment ID

Get Inserted comment ID

3 posts, 0 answered
  1. Siddesh Kapadi
    Siddesh Kapadi avatar
    239 posts
    Registered:
    09 Oct 2009
    30 Jun 2011
    Link to this post
    Hi,

    I have created a custom blog post list. It also has Comments enabled to it.

    How can i get the current inserted comment ID and in which event?

    Regards,
    Siddesh Kapadi
  2. Siddesh Kapadi
    Siddesh Kapadi avatar
    239 posts
    Registered:
    09 Oct 2009
    30 Jun 2011
    Link to this post
    Hi,

    Not BlogPostList but a custom commentsList.


    In a article reference it says:

    http://www.sitefinity.com/devnet/kb/sitefinity-3-x/how-to-require-users-to-log-in-before-posting-comments.aspx

    it says:
    add a handler to submit button.

    this.Container.SubmitButton.Click += new EventHandler(SubmitButton_Click);

    i am using the version 3.7

    ans it cannot be access this way. it is available:
    this.SubmitButton.Click += new EventHandler(SubmitButton_Click);

    but whenever I call this event, by default it saves the comment.

    How can I get the ID of the saved comment?


    Regards,
    Siddesh Kapadi
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Jun 2011
    Link to this post
    Hello Siddesh,

    The submit button is available in the current context, because the control has been exposed as a public property after 3.6. Before that there was a generic container that should be used.

    Override InitializeContrls and replace the event as shown in this forum post, because this is the only way to avoid the click from the base.

    I made SubmitButton command virtual which will allow you to hook with the next SP ( it is not scheduled yet)

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
3 posts, 0 answered