无法获取果汁UI工作 [英] Can't get Juice UI to work
问题描述
我是新来的网络发展。想尝试一下我的手,在ASP.NET + JuiceUI。从Visual Studio中的基本的网站项目模板开始,我想尝试并获得JuiceUI日期选择控件的网页。我跟着指示,并安装JuiceUI到我的项目的NuGet。但是,当我试图让果汁日期选择器到我的网页它根本不起作用:
I'm new to web development. Wanted to try my hand at ASP.NET + JuiceUI. Starting from the basic web site project template in visual studio, I wanted to try and get the JuiceUI Datepicker control in a web page. I followed the instructions and installed JuiceUI into my project with nuget. But when I tried to get a juice Datepicker into my page it simply does not work:
的Default.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>
和它不工作......我得到的第一个愚蠢的文本框,就是这样。由于这是非常简单的code我想我一定是什么地方做了一些愚蠢的错误。我会感激如果有人能帮助我,因为我是新来的web开发。
And it does not work... I get a dumb textbox in the page and that's it. As this is very simple code I guess I must have made some stupid error somewhere. I would be thankful if anyone can help me coz I am new to web dev.
修改
Javascript错误:
Javascript errors:
ReferenceError: jQuery is not defined [http://localhost:2964/Scripts/amplify.js:788]
ReferenceError: jQuery is not defined [http://localhost:2964/Scripts/juice.js:201]
解决方法:
的ScriptManager
用的NuGet安装果汁创建的:
ScriptManager
created with nuget installation of Juice:
<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>
和它的作品。
推荐答案
从你的错误很明显,你需要inlcude jQuery库
From your errors is very clear that you need to inlcude the jQuery library
在果汁的号召,很可能在你的aspx页面的顶部。
before the call of the juice, probably on the top of your aspx pages.
例如:
<script type="text/javascript" src="jquery.js"></script>
更多:
<一href="http://stackoverflow.com/questions/547384/where-do-you-include-the-jquery-library-from-google-jsapi-cdn">Where你包括jQuery库?谷歌JSAPI? CDN?
http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
more:
Where do you include the jQuery library from? Google JSAPI? CDN?
http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
这篇关于无法获取果汁UI工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!