[英]ASP.NET button postback not working is JQuery Mobile
我已经看过关于SO的几种解决方案,但是似乎没有一个解决方案或无法解决JQuery-Mobile的问题。如果我对Mobile
表示赞赏,则回发工作正常并且可以接受更新。
我有一个ASP.net页面,其中添加了JQuery和Datepicker小部件。 -将JQuery Mobile JS添加到页面时,移动页面可以正常工作,并且Datepicker具有添加的JS文件以使其正常运行。 但是页面中的按钮不起作用,我将其范围缩小到jquery.mobile-1.4.3.min.js
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<!--script src="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script-->
<script src="https://rawgithub.com/arschmitz/jquery-mobile-datepicker-wrapper/master/jquery.mobile.datepicker.js"></script>
按钮在<InsertItemTemplate>
</InsertItemTemplate>
<ItemTemplate>
FDID:
<asp:Label ID="FDIDLabel" runat="server" Text='<%# Eval("FDID") %>'></asp:Label><br />
CHOICE1:
<asp:Label ID="CHOICE1Label" runat="server" Text='<%# Bind("CHOICE1") %>'></asp:Label><br />
CHOICE2:
<asp:Label ID="CHOICE2Label" runat="server" Text='<%# Bind("CHOICE2") %>'></asp:Label><br />
CHOICE3:
<asp:Label ID="CHOICE3Label" runat="server" Text='<%# Bind("CHOICE3") %>'></asp:Label><br />
CHOICE4:
<asp:Label ID="CHOICE4Label" runat="server" Text='<%# Bind("CHOICE4") %>'></asp:Label><br />
CHOICE5:
<asp:Label ID="CHOICE5Label" runat="server" Text='<%# Bind("CHOICE5") %>'></asp:Label><br />
CHOICE6:
<asp:Label ID="CHOICE6Label" runat="server" Text='<%# Bind("CHOICE6") %>'></asp:Label><br />
IPADDRESS:
<asp:Label ID="IPADDRESSLabel" runat="server" Text='<%# Bind("IPADDRESS") %>'></asp:Label><br />
PICKDATE:
<asp:Label ID="PICKDATELabel" runat="server" Text='<%# Bind("PICKDATE") %>'></asp:Label><br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
Text="Edit"></asp:LinkButton>
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
Text="Delete"></asp:LinkButton>
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
Text="New"></asp:LinkButton>
</ItemTemplate>
</asp:FormView>
不确定是否与以下内容有关: mobile.js
ui-btn-active
实际上,这在进一步搜索后解决了该问题。
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<script type="text/javascript">
$(document).bind("mobileinit", function() {
$.mobile.ajaxEnabled = false;
});
</script>
<script src="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script>
<script src="https://rawgithub.com/arschmitz/jquery-mobile-datepicker-wrapper/master/jquery.mobile.datepicker.js"></script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.