简体   繁体   中英

Jquery Easy UI + ASP.NET

I would like to implement Jquery EasyUI (http://www.jeasyui.com) in my asp.net application. If you can please provide me with some working examples that would be great. I have never worked with Jquery and hence this question.

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). 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. Just check out this page: http://jqueryui.com/themeroller/

To get you started, here is how you could implement the datepicker widget from a standard ASP textbox:

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:

<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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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