Rappresenta il supporto per i controlli textarea HTML.
System.Web.Mvc.Html.TextAreaExtensions
Spazio dei nomi: System.Web.Mvc.Html
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
<ExtensionAttribute> _ Public NotInheritable Class TextAreaExtensions
Non è necessario dichiarare un'istanza di una classe statica per accedere ai relativi membri.
public static class TextAreaExtensions
[ExtensionAttribute] public ref class TextAreaExtensions abstract sealed
public final class TextAreaExtensions
| Nome | Descrizione | |
|---|---|---|
|
TextArea(HtmlHelper, String) | Restituisce l'elemento textarea specificato utilizzando l'helper HTML e il nome del campo del form specificati. |
|
TextArea(HtmlHelper, String, IDictionary<String, Object>) | Restituisce l'elemento textarea specificato utilizzando l'helper HTML, il nome del campo del form e gli attributi HTML specificati. |
|
TextArea(HtmlHelper, String, Object) | Restituisce l'elemento textarea specificato utilizzando l'helper HTML e gli attributi HTML specificati. |
|
TextArea(HtmlHelper, String, String) | Restituisce l'elemento textarea specificato utilizzando l'helper HTML, il nome del campo del form e il contenuto di testo specificati. |
|
TextArea(HtmlHelper, String, String, IDictionary<String, Object>) | Restituisce l'elemento textarea specificato utilizzando l'helper HTML, il nome del campo del form, il contenuto di testo e gli attributi HTML specificati. |
|
TextArea(HtmlHelper, String, String, Object) | Restituisce l'elemento textarea specificato utilizzando l'helper HTML, il nome del campo del form, il contenuto di testo e gli attributi HTML specificati. |
|
TextArea(HtmlHelper, String, String, Int32, Int32, IDictionary<String, Object>) | Restituisce l'elemento textarea specificato utilizzando l'helper HTML, il nome del campo del form, il contenuto di testo, il numero di righe e colonne e gli attributi HTML specificati. |
|
TextArea(HtmlHelper, String, String, Int32, Int32, Object) | Restituisce l'elemento textarea specificato utilizzando l'helper HTML, il nome del campo del form, il contenuto di testo, il numero di righe e colonne e gli attributi HTML specificati. |
|
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>) | Restituisce un elemento HTML textarea per ogni proprietà nell'oggetto rappresentato dall'espressione specificata. |
|
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, IDictionary<String, Object>) | Restituisce un elemento HTML textarea per ogni proprietà nell'oggetto rappresentato dall'espressione specificata, utilizzando gli attributi HTML specificati. |
|
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, Object) | Restituisce un elemento HTML textarea per ogni proprietà nell'oggetto rappresentato dall'espressione specificata, utilizzando gli attributi HTML specificati. |
|
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, Int32, Int32, IDictionary<String, Object>) | Restituisce un elemento HTML textarea per ogni proprietà nell'oggetto rappresentato dall'espressione specificata, utilizzando gli attributi HTML e il numero di righe e colonne specificati. |
|
TextAreaFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, Int32, Int32, Object) | Restituisce un elemento HTML textarea per ogni proprietà nell'oggetto rappresentato dall'espressione specificata, utilizzando gli attributi HTML e il numero di righe e colonne specificati. |
The TextAreaExtensions class contains methods that extend the HtmlHelper class. Each extension method renders an HTML textarea element. The TextArea method renders an element that enables the user to enter multiple lines of text that is then submitted to the Web server.
The following example shows how to create a form that enables the user to enter text for an article and to enter the article title. The form provides a TextArea helper method that is used to enter the article text. The method also passes an anonymous object that contains the HTML attributes that are used to render the textarea element.
When the user submits the form, the TextArea action method handles the request. This method uses a regular expression to replace newline (\n) characters with HTML br elements in order to retain paragraph formatting.
The following example shows the view that is rendered in order to display the text that was submitted.