poke / khalidabuhakmeh_ContactForms

ASP.NET Core 5 Contact Form Sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contact Forms With C# 9 and ASP.NET 5

Summary

The sample contained within this repository explores what its like to build a contact form utilizing out-of-the-box features of ASP.NET Core 5 and C# 9.

  • ASP.NET Model-View-Controller (MVC)
  • DataAnnotations and Validation
  • record types and init properties.
  • Razor Pages and BindPropertyAttribute
  • ASP.NET Tag Helpers (asp-for, asp-page, etc.)
  • Dependency Injection
  • Pattern Matching
  • TempDataAttribute on properties.

There are concepts utilized in this repo that should ease folks into building ASP.NET apps.

My Thoughts

The contact form is one of the most common web components found on millions of websites across the internet. I've personally built 100's of these forms, but have yet to do so with the latest in ASP.NET Core 5 and C# 9 features. I set out to do so and see what kinds of previous issues have been conquered, and what new challenges lay ahead for newcomers.

I'd love to hear your thoughts, and if you think it could be even more C#-9-ified, please don't hesitate to send in a pull request.

Also, reach out to me on Twitter at @buhakmeh if you feel I missed something.

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to http://unlicense.org/

About

ASP.NET Core 5 Contact Form Sample


Languages

Language:C# 49.2%Language:HTML 41.4%Language:CSS 8.0%Language:JavaScript 1.3%