I have a similar problem to the one described in this other question: aspnet webforms disable button on submit. My ASP.NET Web Forms site works fine before I added jQuery and jQuery mobile. After installing those packages with NuGet, the code for my image button is ignored. A simple button had a similar problem to the image button until I set UseSubmitBehavior="true"
. Disabling jQuery Mobile is enough to re-enable the button functionality. Also there is a strange problem that the 'View Source' of IE10 returns the previous page's markup while the developer menu shows the actual XHTML - I don't know if that is relevant.
My code should normally be run after an image button click Protected Sub BTNtoggleHole_Click(sender As Object, e As ImageClickEventArgs) Handles BTNtoggleHole.Click
but it refuses so I have forced it to run in Public Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
. Is there some page lifecycle stuff I'm missing?
The following is the button that no longer triggers any server side code:
<asp:ImageButton ID="BTNtoggleHole" runat="server" Style="float: right;" ImageUrl="~/Images/Buttons/Handicaps/9-hole-toggle.png" CausesValidation="False" ClientIDMode="Inherit" AlternateText="18/9 hole toggle" />
Clicking the button causes a postback regardless of whether or not the jQuery is commented out, not present, or disabled.