---
title: "Access a field using the FieldRenderer"
slug: "access-a-field-using-the-fieldrenderer"
abstract: "How to access a field using the FieldRenderer web control to output field values."
---
# Access a field using the FieldRenderer

In presentation components, whenever possible, use the `FieldRenderer` Web control to output field values. For example, to output the *Title* field in the context item from a Web control:

```csharp
namespace Namespace.Web.UI.WebControls
{
    public class WebControlName : Sitecore.Web.UI.WebControl
    {
        protected override void DoRender(System.Web.UI.HtmlTextWriter output)
        {
            string html = Sitecore.Web.UI.WebControls.FieldRenderer.Render(
            Sitecore.Context.Item, "title");
            output.Write(html);
         }
      }
 }

```

Alternatively, you can add the `FieldRenderer` Web control to a layout or sublayout. For example:

`<sc:FieldRenderer runat="server" ID="fieldControl" />`

In the code behind for the layout or sublayout, set properties of the control. For example, to render the *Title* field in the context item:

```csharp
namespace Namespace.Web.UI
{
    public partial class SublayoutName : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            fieldControl.DataSource = Sitecore.Context.Item.Paths.FullPath;
            fieldControl.FieldName = "title";
         }
      }
}

```

> [!important]
> The `FieldRenderer` Web control does not support all field types. For example, you cannot use this type to retrieve *Multilist* data. See [Access Checklist, Multilist, Treelist, and TreelistEx fields](https://doc.sitecore.com/xp/en/developers/105/sitecore-experience-manager/access-checklist-multilist-treelist-and-treelistex-fields.html "Access Checklist, Multilist, Treelist, and TreelistEx fields").
>
> You can use the *FieldRenderer* Web control with *Date*, *Datetime*, *Image*, *Integer*, *Multi-Line Text*, *Number*, *Rich Text*, and *Single-Line Text* fields.