Mid ASP.NET Core

Sanitization of input?

Model binding does not sanitize input — it binds raw data.

🛡 To prevent attacks (XSS, injection), sanitize:

  • Strings: HTML encode output (@Html.Encode)
  • Manually clean input before use
  • Use antivirus/malware scanners for uploaded files

More from ASP.NET Core Tutorial

All questions for this course