Friends, How are you all doing? I know you may have a question – “Long time, No Posts?” Yeah, I got some halt (e.g. busy with new project) in my sitecore journey. And in this halt – I have learnt many new things, now it’s time to share these leanings. So let’s start knowledge sharing. Scenario: Have you come across a requirement where you are using asp.net control (e.g. repeater control) and you want to bind sitecore item field values inline without using any asp.net or sitecore control? If so, then this post may help you. Many of you have rendered sitecore field value inline using below approach which is completely correct.
But, what if you want to bind sitecore field value without using any sitecore control (e.g. sc:fieldrender) or asp.net control? In such case, you can use following approach:
This is how you can render sitecore field inline:
<%# ((Sitecore.Data.Items.Item)(Container.DataItem)).Fields["Text Heading"].Value %>
Hello,
May I know why you have used onitemdatabound="OnLandingPageItemCreated event?
is it necessary?
Thanks
Yes, it's necessary otherwise it will not bind the container item.