Jpage pagination. net2.0 version general. net2.0 Paging Program __.net

Source: Internet
Author: User
Tags connectionstrings

Jpage paging. net2.0 Edition is officially released.


Author of this page: Last night Wind
Personal business are free, need to download the source, please leave the mailbox.
1, this version of the page only for SQL Server database, using top n paging way, save resources.
2, support the GridView, DataGrid, DataList and other data control.
3, this page has been applied to the data volume millions project.

First, the use of methods:

1. In. net2005 Studio, add a new control, adding the download to the local jwork.dll to the toolbox.


2, Jpage paging will default read Web.config configuration file, named data connection string.

<connectionStrings>
<add name= "Data" connectionstring= "server=.; Uid=sa;pwd=1234;database=cndata "providername=" System.Data.SqlClient "/>
</connectionStrings>

In the post code. CS, the following:

protected void Page_Load (object sender, EventArgs e)
{
if (! IsPostBack)
{
String Sql= "SELECT * from News";
Jpage1.jselect = SQL; Query statement
Jpage1.jsortfield = "id desc";//Sort by
Jpage1.databind ()//binding Data
}
}

If you do not set the database string in web.config, you need to use the properties of the Jpage object to set:



protected void Page_Load (object sender, EventArgs e)
{
if (! IsPostBack)
{
String Sql= "SELECT * from News";
Jpage1.jconnstr= "server=.; Uid=sa;pwd=1234;database=cndata ";
Jpage1.jselect = SQL; Query statement
Jpage1.jsortfield = "id desc";//Sort by
Jpage1.databind ()//binding Data
}
}

Jpage Common Properties:

Jcachetime Cache Time
JCONNSTR Database Connection string
JCONTROL Specifies the control ID of the displayed list of data, and the default search ID is dlist
Jpageindex the current page index, generally by default.
Jpagesize per page size, defaults to 20 pages
Jselect SQL statements
Jsortfield sort fields that can be grouped, such as "ID desc,time desc"
Jstyle pagination style, default defaults style



Other properties are common properties and are not described here.
For convenience, the ID of the GridView DataList control is generally defined as dlist, so that you do not need to set jpage each time, place the connection string of the database in Web.config, and name "data". This does not require the Jconnstr property to be set each time.

Jpage The default effect of paging:



Well, Jpage will make a surprise for you. net2.0 Development.

Second, Jpage download
Upload/2007_07/07073016491502.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.