简体   繁体   English

ASP.NET按钮回发不起作用是JQuery Mobile

[英]ASP.NET button postback not working is JQuery Mobile

I have looked at several solutions on SO but none seem to work or don't address JQuery-Mobile, If I commment out Mobile the postback works fine and update is accepted. 我已经看过关于SO的几种解决方案,但是似乎没有一个解决方案或无法解决JQuery-Mobile的问题。如果我对Mobile表示赞赏,则回发工作正常并且可以接受更新。

I have an ASP.net page that i have added JQuery and Datepicker widget. 我有一个ASP.net页面,其中添加了JQuery和Datepicker小部件。 - when adding JQuery Mobile JS to the page the mobile page works fine and the Datepicker has an added JS file to make it function as well. -将JQuery Mobile JS添加到页面时,移动页面可以正常工作,并且Datepicker具有添加的JS文件以使其正常运行。 However the button in the page is not working, I have narrowed it down to jquery.mobile-1.4.3.min.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>

Button is within an <InsertItemTemplate> 按钮在<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>

not sure if it has anything to do with: ui-btn-active in the mobile.js 不确定是否与以下内容有关: mobile.js ui-btn-active

Actually this resolved the issue after further search. 实际上,这在进一步搜索后解决了该问题。

<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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM