Jquery Mobile and Asp.net button events not firing and redirect to back page

In the Jquery Mobile when we try to click on the asp.net button then it would not fire any events and redirect to back page. But when i refresh the page then button click event works like charm. To fix this I have googled but unalbe to find any solution.

The best solution is to fix this problem please add data-ajax=”false” in all the link button you have in your project. Like I was going Page1 to Page2 and on the page2 button click event was not working first time, On page refresh it works. So what I did I added data-ajax=”false” in Page1 link button like below :-

Page 1 Link Button Code

<a data-ajax="false" href="OrderDetails.aspx?OrderId=<%#Eval("DIODR#") %>">
                    <%#Eval("DIODR#")%/></a>

Page 2 Button code


<asp:Button runat="server" data-ajax="false" ID="btnGetSignature" Text="Get Signature" OnClick="btnGetSignature_Click" />

Server Side Code of button event click

protected void btnGetSignature_Click(object sender, EventArgs e)
{
 Response.Redirect("~/GetSignature.aspx");
}

Hope that would help and save your time too. Feel free to contact me if need any help.

Cheers..

Posted by | View Post | View Group