Disabling JQM ajax request and receive ugly UI instead
I have a asp page and I disabled my jquery post via
$.mobile.ajaxEnabled = false
script, but now new problem occurred and its about my page UI, as I disabled the jquery request the server response that return from first request is not user friendly at all, because jquery handle the UI of my page. Now the question is how to manage both the UI and ajax request inside my page?
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ConfirmLc.aspx.cs" Inherits="Confirm"%>
<%@ Register Src="../controls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc2" %>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="jquery.mobile-1.1.1.min.css" />
<script src="jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="jquery.mobile-1.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).bind("mobileinit", function () {
$.mobile.ajaxEnabled = false;
});
</script>
</head>
<body>
<form id="form1" runat="server" dir="rtl" data-ajax="false" >
<asp:ScriptManager ID="ScriptManager" runat="server" ScriptMode="Release"/>
<div id="confirm" data-role="page">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
<ContentTemplate>
<div data-role="header">
<h1>header</h1>
</div>
<div data-role="content">
//asp panel and other content comes here
</div>
<div data-role="footer">
<p>footer</p>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>