MVC4 Mobile Classic
Textareas

The Summary multiline textarea will grow as you type. This avoids the need for an internal scrollbar, which tends to be difficult to use on a mobile device. This sort of input is especially useful when you need to gather more information than will generally fit in a singleline input element.

The following markup and Razor syntax create the Summary element:

<li data-role="fieldcontain">
    @Html.LabelFor(model => model.Summary)
    @Html.EditorFor(model => model.Summary)
    @Html.ValidationMessageFor(model => model.Summary)
</li>

The code from the TahDoList Model marks this element as a MultilineText element:

[DataType(DataType.MultilineText)]

public string Summary { get; set; }

This results in a Summary textarea that resembles the following image:

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback