0

私はウェブ開発が初めてです。ASP.NET + JuiceUI を試してみたかった。Visual Studio の基本的な Web サイト プロジェクト テンプレートから始めて、Web ページで JuiceUI Datepicker コントロールを取得しようとしました。指示に従い、nuget を使用して JuiceUI をプロジェクトにインストールしました。しかし、ジュースの Datepicker を自分のページに取り込もうとすると、うまくいきません。

デフォルト.aspx

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %>.</h1>
                <h2>Modify this template to jump-start your ASP.NET application.</h2>
            </hgroup>
            <p>

            <asp:TextBox id="_test" runat="server" ></asp:TextBox>
            <juice:Datepicker TargetControlID="_test" runat="server" />
        </div>
    </section>
</asp:Content>

そして、それは機能しません...ページにダムのテキストボックスが表示され、それだけです。これは非常に単純なコードなので、どこかで愚かなエラーを犯したに違いないと思います。私はWeb開発が初めてなので、誰かが私を助けてくれればありがたいです。

編集

Javascript エラー:

ReferenceError: jQuery is not defined [http://localhost:2964/Scripts/amplify.js:788]
ReferenceError: jQuery is not defined [http://localhost:2964/Scripts/juice.js:201]

解決:

ScriptManagerJuice の nuget インストールで作成:

<asp:ScriptManager runat="server">
    <Scripts>
        <asp:ScriptReference Name="jquery"/>
        <asp:ScriptReference Name="jquery.ui.combined"/>
    </Scripts>
</asp:ScriptManager>

修理:

<asp:ScriptManager runat="server">
    <Scripts>
        <asp:ScriptReference Name="jquery" Path="~/Scripts/jquery-1.8.3.js"/>
        <asp:ScriptReference Name="jquery.ui.combined"  Path="~/Scripts/jquery-ui-1.9.2.js"/>
    </Scripts>
</asp:ScriptManager>

そして、それは機能します。

4

1 に答える 1