How to bind sitecore field inline in repeater control?

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 %> 

2 Responses to “How to bind sitecore field inline in repeater control?”
  1. Prashant February 18, 2016
  2. Nilesh Thakkar June 1, 2016

Leave a Reply