Proj. plan, URS v1.01; UML v1; ModelBinding, DataAnnotations, Models start
This commit is contained in:
19
StudentHouseDashboard/WebApp/Pages/Contact.cshtml.cs
Normal file
19
StudentHouseDashboard/WebApp/Pages/Contact.cshtml.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace WebApp.Pages
|
||||
{
|
||||
public class ContactModel : PageModel
|
||||
{
|
||||
[BindProperty]
|
||||
public Contact Contact { get; set; }
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnPost()
|
||||
{
|
||||
ViewData["confirm"] = $"Thank you for contacting us, {Contact.Name}! We promise to return a response in a timely manner to the following e-mail address: {Contact.Email}";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user