Yes. I had this done a couple of weeks ago for mine. In MVC there is a nuget for minifying cshtml files but considering webforms, here is the fix. There is an open source htmlminifier available to minify html.
1) Please clone this project and run it to create an exe inside the bin folder

2) Right click your project and click 'Unload Project'
3) Right click on the unloaded project and choose edit .csproj
4) Add this target at the end of the file
<Target Name="AfterBuild" AfterTargets="">
<Message Text="Minifying files.....$(DirectoryGroups)" />
<Exec Command="c:\Users\Admin\htmlminifier.exe C:\Users\ADMIN\Desktop\htmlminifier" IgnoreExitCode="true" />
</Target>
5) Reload the project
6) Build and publish your website. The minification is done.
Before minification

After minification
