In ASP.NET Framework when I want to pass HTML code from Javascript to Controller just wrote [ValidateInput(false)] before Method and no problem for me:
Just like my question here
I need to know same but ASP.NET Core.
Error CS0246 The type or namespace name 'ValidateInput' could not be found (are you missing a using directive or an assembly reference?)
Thanks
In asp.net core you may not need to add this attribute, because, by default, the validation is not so strict as in ASP.NET MVC 4 or 5.
For example, passing HTML code via POST to a controller does throw an exception in older versions of ASP.NET(eg MVC 5)
A potentially dangerous Request.Form value was detected from the client
whereas in ASP.NET core, there is no exception.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With