We have moved!

You are currently looking at documentation for Umbraco 8 and older versions.
An automated guess is that docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-property-editors/textbox/index-vpost-7_4 could be the link to the new documentation for Umbraco 9 and newer versions.

    Textbox

    Alias: Umbraco.Textbox

    Returns: String

    Textbox is an HTML input control for text.

    Data Type Definition Example

    Textbox Data Type Definition

    Settings

    Content Example

    Textbox Content Example

    MVC View Example

    @{
        if (Model.Content.HasValue("pageTitle")){
            <p>@(Model.Content.GetPropertyValue<string>("pageTitle"))</p>
        }
    }
    

    Dynamic (Obsolete)

    See Common pitfalls for more information about why the dynamic approach is obsolete.

    @{
        if (CurrentPage.HasValue("pageTitle")){
            <p>@CurrentPage.pageTitle</p>
        }
    }