繁体   English   中英

是否与Mootools Scriptmanager Ajax Asp.net发生冲突?

[英]Conflicts Mootools Scriptmanager Ajax Asp.net?

我正在尝试不同的方法来使这项工作成功,但是没有成功。 我正在尝试将mootools与asp.net应用程序集成。 我只想用它为我的网站添加一些效果。 我也使用更新面板,scriptmanager,因为不希望有完整的回发。 在控制台上引发错误TypeError:clientID.startsWith不是函数,并且在进行更新时将浏览器复位。...这是完整的代码。 希望对我有帮助,感谢阿甘!

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Default.master.cs" Inherits="guiaEscoles" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title>Title go here</title>
    <link href="~/css/main.css" rel="stylesheet" type="text/css" />
    </head>
<body>
    <form runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" LoadScriptsBeforeUI="true" EnablePartialRendering="true" >
            <Scripts>
                <asp:ScriptReference Path="~/scripts/mootools-core-1.4.5-full-compat-yc.js"></asp:ScriptReference>
                <asp:ScriptReference Path="~/scripts/mootools-more-1.4.0.1-yc.js" ></asp:ScriptReference>
                <asp:ScriptReference Path="~/scripts/jsecoles.js"></asp:ScriptReference>                
            </Scripts>
        </asp:ScriptManager>

        <asp:Panel runat="server" DefaultButton="" >
            <asp:UpdatePanel runat="server" UpdateMode="Always">
                <ContentTemplate>
                    <asp:DropDownList runat="server" ID="DropDownListCountries" >
                    </asp:DropDownList>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>

        <asp:ContentPlaceHolder ID="MainContent" runat="server" />

     </form>
</body>
</html>


<%@ Page Title="" Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" CodeFile="search.aspx.cs" Inherits="searchschool" %>

<%@ MasterType VirtualPath="~/Default.master" %>     

<asp:Content ID="ContentSearch" ContentPlaceHolderID="MainContent" runat="Server">

                <div id="PlaceItem" runat="server">
                    <div id="ulLugar" class="">
                        <ul>
                            <li>
                                <asp:DropDownList runat="server" ID="DropDownListCountryBottom" AutoPostBack="true" OnSelectedIndexChanged="DropDownListCountryBottom_SelectedIndexChanged" EnableViewState="true">
                                </asp:DropDownList>
                            </li>
                            <li>
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="DropDownListCountryBottom" EventName="SelectedIndexChanged" />
                                    </Triggers>
                                    <ContentTemplate>
                                        <asp:DropDownList runat="server" ID="DropDownListCounty" OnDataBound="DropDownListCounty_DataBound" AutoPostBack="true" OnSelectedIndexChanged="DropDownListCounty_SelectedIndexChanged" EnableViewState="true">
                                        </asp:DropDownList>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </li>
                            <li>
                                <asp:DropDownList runat="server" ID="DropDownListDistrict" OnSelectedIndexChanged="DropDownListDistrict_SelectedIndexChanged" AutoPostBack="true" EnableViewState="true">
                                </asp:DropDownList>
                            </li>
                        </ul>
                    </div>

                <div id="divStudies" >
                        <asp:CheckBox ID="CheckBoxStudies" runat="server" Text="<%$ Resources:Escoles, CheckBoxPQPILabel %>" OnCheckedChanged="CheckBoxStudies_CheckedChanged" AutoPostBack="true" />
                </div>

                <asp:Repeater ID="RepeaterThemes" runat="server" OnItemDataBound="RepeaterThemes_ItemDataBound">
                    <HeaderTemplate>
                        <ul>
                    </HeaderTemplate>
                    <FooterTemplate></ul></FooterTemplate>
                    <ItemTemplate>
                        <li class="liTema">
                            <asp:CheckBox ID="CheckBoxTheme" runat="server" OnCheckedChanged="CheckBoxTheme_CheckedChanged" AutoPostBack="true" EnableViewState="false" /></li>
                    </ItemTemplate>
                </asp:Repeater>

                <asp:UpdatePanel runat="server" UpdateMode="Always">
                    <ContentTemplate>
                        <asp:GridView runat="server" ID="GridViewEscoles" CellPadding="0" CellSpacing="0" BorderStyle="None">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Label Text='<%# Eval("Field_1") %>' runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </ContentTemplate>
                </asp:UpdatePanel>

</asp:Content>

这是myjs文件:

window.addEvent('domready', function () {

    alert("Hello");
    //var countTotal = $$('.liTema').length;
    //alert(countTotal);



});

这是由于mootools与Microsoft Ajax代码之间存在冲突,据mootools称,他们将此错误归咎于Microsoft的代码。 我一直在寻找解决方案,但直到现在都没有找到

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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