簡體   English   中英

ASP.NET按鈕回發不起作用是JQuery Mobile

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM