简体   繁体   English

jQuery Easy UI + ASP.NET

[英]Jquery Easy UI + ASP.NET

I would like to implement Jquery EasyUI (http://www.jeasyui.com) in my asp.net application. 我想在我的asp.net应用程序中实现Jquery EasyUI(http://www.jeasyui.com)。 If you can please provide me with some working examples that would be great. 如果可以的话,请提供一些很好的工作示例。 I have never worked with Jquery and hence this question. 我从未与Jquery合作过,因此没有这个问题。

A small single example would also do me good 一个小的例子对我也有好处

为什么使用此功能,请使用jquery-UI(http://www.jqueryui.com),它更简单,您也可以在jqueryui中更改或创建自己的主题。

This is a pretty broad question. 这是一个非常广泛的问题。 I can help you somewhat by showing you how to easily create the references to the jquery libraries (assuming you want to do that instead of having them on your server). 我可以通过向您展示如何轻松创建对jquery库的引用来帮助您(假设您想这样做而不是将它们放在服务器上)。 If you're just getting started, this is probably the easiest way to do so. 如果您只是入门,这可能是最简单的方法。

Include these lines in your Master page: 在母版页中包括以下几行:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>

Make sure you use the latest versions which you can find from an easy search. 确保使用可以从轻松搜索中找到的最新版本。 The second reference is for the customUI which you don't need but will want to use for styling the widgets, which you can do that through their customUI which is pretty easy to work with. 第二个参考是您不需要的customUI,但您想将其用于样式化小部件,您可以通过它们的customUI进行操作,这很容易使用。 Just check out this page: http://jqueryui.com/themeroller/ 只需查看以下页面即可: http : //jqueryui.com/themeroller/

To get you started, here is how you could implement the datepicker widget from a standard ASP textbox: 首先,这是如何从标准ASP文本框中实现datepicker小部件的方法:

You put this in your header: 您将其放在标题中:

    <script type="text/javascript" charset="utf-8">
        $(function () {
            $(".datePicker").datepicker();
        });
    </script>

Then you reference the 'datepicker' class in a textbox as such: 然后,您在文本框中引用“ datepicker”类,如下所示:

<asp:TextBox ID="txtDate" Text="select date" CssClass="datePicker" runat="server" AutoPostBack="True"></asp:TextBox>

All the sample code you could want really is on the jqueryui.com site so give that a shot and come back if you have specific questions about implementing a specific widget. 您可能真正想要的所有示例代码都在jqueryui.com网站上,因此,如果您对实现特定小部件有特定疑问,请试一下并返回。

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

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