3

Is there an easy way in C# to validate an html file (.htm) ?

mikemaccana
  • 110,530
  • 99
  • 389
  • 494
Patrick Peters
  • 9,456
  • 7
  • 57
  • 106

1 Answers1

2

You could try the article C# Validate XHTML on Dot Net Perls.

If you are not tied to doing this in C#, then usually the best way to validate HTML is using the W3C validation service.

You could of course, write some kind of test harness in C# which pushes all your HTML through the W3C validator, if it makes sense in your case.

Adam Ralph
  • 29,453
  • 4
  • 60
  • 67