ASP.NET - Button clicks not firing on the home page

I'm not going to tell you that I understand the answer... it's posted in full here:

http://stackoverflow.com/questions/7228344/postback-doesnt-work-with-aspx-page-as-default-document

but I can tell you what I did to fix it: I placed this code in the Global.asax

Sub Application_BeginRequest(sender As Object, e As EventArgs)
    Dim app As HttpApplication = CType(sender, HttpApplication)
    If app.Context.Request.Url.LocalPath.EndsWith("/") Then
        app.Context.RewritePath(String.Concat(app.Context.Request.Url.LocalPath, "default.aspx"))
    End If
     
End Sub


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences