Sometimes I find it useful to be able to suppress certain markup validation warnings within files that contain HTML (ASPX, etc.).
Is there an equivalent of #pragma warning disable\restore
for HTML?
Suppress specific warnings for Visual C# or F# Or, select the project node and press Alt+Enter. Choose Build, and go to the Errors and warnings subsection. In the Suppress warnings or Suppress specific warnings box, specify the error codes of the warnings that you want to suppress, separated by semicolons.
There are similar questions around, see this and that.
Unfortunately there is no solution to do it selectively. Only a global turn-off of the validation will hide those warnings.
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