From 2a561c91a3fe99183f85e504799c5fd29750fa7b Mon Sep 17 00:00:00 2001 From: Phil Haack Date: Wed, 21 Jun 2023 08:06:29 -0700 Subject: [PATCH] Add a textarea demo --- Pages/Index.cshtml | 6 ++++++ Pages/Index.cshtml.cs | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/Pages/Index.cshtml b/Pages/Index.cshtml index 13c13ba..e245f7b 100644 --- a/Pages/Index.cshtml +++ b/Pages/Index.cshtml @@ -50,6 +50,12 @@ +
+ + + +
+
@foreach (var animal in Model.Animals) { diff --git a/Pages/Index.cshtml.cs b/Pages/Index.cshtml.cs index fd99930..3e34824 100644 --- a/Pages/Index.cshtml.cs +++ b/Pages/Index.cshtml.cs @@ -19,6 +19,10 @@ public class IndexModel : PageModel [Required] public string? Control { get; set; } + [BindProperty] + [Required] + public string? TextArea { get; set; } + [BindProperty] [Required] public List? SelectedAnimals { get; set; }