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
why you use this, use jquery-UI (http://www.jqueryui.com), its more easy and you can change or create your own theme too in 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.
精彩评论