Try Now
More in this section

Forums / General Discussions / Blog Problem

Blog Problem

2 posts, 0 answered
  1. praba karan
    praba karan avatar
    11 posts
    04 Aug 2009
    16 Aug 2009
    Link to this post
    1. how can i Create Comment for a particular Blog Post via code?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    19 Oct 2016
    16 Aug 2009
    Link to this post
    Hello praba karan,

    Below is a sample code that illustrates how to add a comment manually.

                   BlogManager blogManager = new BlogManager(); 
                    IContent blogcontent = blogManager.Content.GetContent(new Guid("DE524EDF-3790-4CF7-85F1-3555381D13C3")); 
                    IComment comment = blogManager.Content.CreateComment(blogcontent); 
                    comment.Text = "this is my new comment"
                    comment.Author = "Admin"
                    comment.Visible = true

    Sincerely yours,
    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