Textbox

    Alias: Umbraco.Textbox

    Returns: String

    Textbox is a simple HTML input control for text. It can be configured to have a fixed character limit. The default maximum amount of characters is 500 unless it's specifically changed to a lower amount.

    Data Type Definition Example

    Without a character limit

    Textbox Data Type Definition

    With a character limit

    Textbox Data Type Definition With a Character Limit

    Settings

    Content Example:

    Without a character limit

    Textbox Content Example

    With a character limit

    Textbox Content Example Without a Character Limit

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