hi, is there a way to add block on a content area programmatically?
Yes. Here's some pseudo code
Or if you already have a contentarea with references something like this.
Don't forget to save the page
contentRepository.Save(yourpageobject, EPiServer.DataAccess.SaveAction.Publish, Security.AccessLevel.NoAccess);
This does not appear to work. After adding the block (IContent) it appears in the ContentArea, but after the save and reload the block disappears. It's also worth noting that it best to set where the saved block will be saved.