Taritsyn / WebMarkupMin

The Web Markup Minifier (abbreviated WebMarkupMin) - a .NET library that contains a set of markup minifiers. The objective of this project is to improve the performance of web applications by reducing the size of HTML, XHTML and XML code.
Apache License 2.0
449 stars 48 forks source link

HTTP modules cause forms button do post back error #12

Closed kenyazilim closed 8 years ago

kenyazilim commented 8 years ago

When HTTP modules HtmlMinificationModule used asp.net butons do post back not working. I think it's removing some codes.

The javaScript conseole gives "WebForm_DoPostBackWithOptions is not defined" error.

Taritsyn commented 8 years ago

Hello, Adalilar!

I could not reproduce this error.

Try to reproduce this error in the form of a small demonstration project, and then send me a link to its source code.

kenyazilim commented 8 years ago

Hello!

If you need I can create a demo live page.

test.aspx `

` **test.aspx.cs** `var id = "5"; Button1.PostBackUrl = "test.aspx?do=add&id=" + id;` Offcouser we need to install and enable HTTP modules **Nuget Console** ` Install-Package WebMarkupMin.AspNet4.HttpModules ` **Web.config** ` ` When you try to run this code the button do not working. It's sending data to current url not to post back url. And if you se javascript console (easy way click button when text box emty) it will give "WebForm_DoPostBackWithOptions is not defined" error.
Taritsyn commented 8 years ago

In WebMarkupMin 2.1.1 fixed this error.

Thanks for information!

Problem has been found in HttpCompressionModule. It turned out, that in ASP.NET Web Forms can not correctly apply HTTP compression to WebResource.axd file. Therefore I excluded this file from processing.