JQuery UI provides powerful front-end functions, including calendar and drag-and-drop features based on scripts and style sheets. However, these functions are all based on javascript programming, for programmers who are not attribute-specific, it is still difficult to master jQuery UI.
Today, I want to introduce you to a standard ASP. NET control library JuiceUI, which you can download from this address http://www.juiceui.com.
JuiceUI is an open-source WebForms control set. You can simply use jQuery UI components in the WebForm project. Now, you can easily use the popular JavaScript interface library in ASP. NET projects.
For example, if you want to implement a pop-up calendar selector in the page, the following code can be done.
- <asp:TextBox runat="server" ID="_Default" />
- <Juice:Datepicker runat="server" TargetControlID="_Default" />
Drag a widget!
Note: The use of ScriptManager must be added first.
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="JuiceUI_1.WebForm1" %>
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
- <title></title>
-
- <body>
- <form id="form1" runat="server">
- <div>
- <asp:ScriptManager ID="ScriptManager1" runat="server">
- </asp:ScriptManager>
- <asp:TextBox runat="server" ID="_Default" />
- <juice:Datepicker runat="server" TargetControlID="_Default" />
- </div>
- </form>
- </body>
-
The following controls are even provided:
- Page up/down-last month/next month
- Ctrl + page up/down-previous year/next year
- Ctrl + home-current month or open when closed
- Ctrl + left/right-yesterday/tomorrow
- Ctrl + up/down-last week/time week
- Enter-accept the selected date
- Ctrl + end-close and erase the date
- Escape-close the datepicker without selection
You can drag it from the toolbox.
What? You want more control in the code, no problem! You can set a large number of attributes, such as DateFormat.
Download it here! Http://nuget.org/packages/JuiceUI
If you have installed NuGet, you can directly use this command to add this support for your project.
Install-Package JuiceUI
Note: This library is based on jQuery and jQuery UI. The following is the version it uses:
JQuery 1.7.1
JQuery. UI. Combined1.8.17
After installation, all required files are already in your project, including jQuery.
Including scripts
Include all files in your project folder.