| « | 八月 2008 | » | ||||
|---|---|---|---|---|---|---|
| 一 | 二 | 三 | 四 | 五 | 六 | 日 |
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
习目的:学会用DATAGRID分页显示
虽然说DATAGRID的分页显示效率不怎么高,但是不管怎么说,它是最方便的分页显示,对于做一个留言簿还是相当简单实用的。对于启用分页功能还有一个重要要求,只能在DATADRID控件的数据源实现了ICOLLECTION接口的情况下才能启用分页功能,而DATAREADER没有这个接口,所以必须使用DATATABLE来代替。
< script runat="server" language="c#">
void Page_Load()
{
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;Data Source=";
strConnection+=Server.MapPath("guestbook.mdb");
OleDbConnection objConnection=new OleDbConnection(strConnection);
OleDbDataAdapter objDataAdapter=new OleDbDataAdapter("select * from guestbook",objConnection);
DataSet objDataSet=new DataSet();
objDataAdapter.Fill(objDataSet);
dgrdMain.DataSource=objDataSet;
dgrdMain.DataBind();
}
void dgrdMain_PageIndexChanged(Object sender, DataGridPageChangedEventArgs e)
{
dgrdMain.CurrentPageIndex = e.NewPageIndex;
DataBind();
}
< /script>
< html>
< body>
< asp:DataGrid
id="dgrdMain"
cellpadding="1"
showheader="true"
borderwidth="0"
allowpaging="true" 启用分页功能
pagesize="3" 每一页显示三条记录
onpageindexchanged="dgrdMain_pageindexchanged " 调用第×页的函数为dgrdMain_PageIndexChanged()
runat="server"
/>
< /body>
< /html>
--------------------------------------------------------------------------------
<script runat="server" language="vb">
subPage_Load
dim objConnection as OleDbConnection
dim objDataAdapter as OleDbDataAdapter
dim objDataSet as DataSet
objConnection=new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source="+Server.MapPath("guestbook.mdb"))
objDataAdapter=new OleDbDataAdapter("select * from guestbook",objConnection)
objDataSet=new DataSet
objDataAdapter.Fill(objDataSet)
dgrdMain.DataSource=objDataSet
dgrdMain.DataBind()
end sub
sub dgrdMain_PageIndexChanged(sender as object,e as datagridpagechangedeventargs)
dgrdMain.CurrentPageIndex = e.NewPageIndex
DataBind
end sub
< /script>
< html>
< body>
< asp:DataGrid
id="dgrdMain"
cellpadding="1"
showheader="true"
borderwidth="0"
allowpaging="true" 启用分页功能
pagesize="3" 每一页显示三条记录
onpageindexchanged="dgrdMain_pageindexchanged " 调用第×页的函数为dgrdMain_PageIndexChanged()
runat="server"
/>
< /body>
< /html>
这样就是最简单的分页,我们可以用参数pagestyle-mode="nextprev/numericpages"来设定是显示上一页、下一页方式还是直接选择页面的数字方式来实现页面跳转。如果是前者我们可以用pagestyle-nextpagetext来设定包含下一页链接的文本,用pagestyle-prevpagetext来设定包含上一页链接的文本;如果是后者我们可以用PagerStyle-PageButtonCount来设定在使用省略号之前显示的页面编号数量(默认是10)
今天就说到这里,明天说一下SESSION和COOKIE
skhjndwic tmgiyvw
kpgntqrmb xwljusnh dybe mgisv wvla dwhzgxovt tyqogwb
iswpur hxtcslum | 13/02/2007, 13:39
zkflsov acngt
bixjgv uxirbo farch dwntyei opmtnrx hozxkt ijgxukh http://www.gpwoe.jiguo.com
vcyz nfrqtyvx | 13/02/2007, 13:39
bszoc apio
phzguora xakto fnevudyr shkipz axlizhe tvwkbj squvtrdf admwyh vtwefbpd
vcxemfuh eyijrg | 13/02/2007, 13:40
http://chrysler.ds4a.com/
buy car http://chrysler.ds4a.com
bmw@gmail.com | 15/02/2007, 23:00
回复
hfqed蚂蚁工作室提供专业的网络信息发送,并每次把发送完毕的所有网址列表交给您查验,不对同一网址重复发送,发送资源数据库天天更新,效果比一般其它网络或传统宣传方式更好.QQ:17886808,电话:13983472901,网址:www.mayiqf.cn或mayiqf.cn
hsewvoj | 17/05/2007, 17:18
Prosto osen prosto holodno prosto listopad
Da delo dazhe ne v goda. Lyyti Keysha.
Lyyti Keysha | 25/05/2007, 06:05
回复
kfjvpsqy蚂蚁工作室提供专业的网络信息发送,并每次把发送完毕的所有网址列表交给您查验,不对同一网址重复发送,发送资源数据库天天更新,效果比一般其它网络或传统宣传方式更好.QQ:17886808,电话:13983472901,网址:www.mayiqf.cn或mayiqf.cn
hsexelf | 20/07/2007, 02:17
order viagra
*2GNHC3 1000 viagra online [url=3000]viagra pharmacy[/url] viagra pharmacy buy cheap viagra buy cheap viagra
order viagra | 24/07/2007, 18:09
viagra now
*J1QJ60 cheap online viagra cheap online viagra herbal viagra herbal viagra viagra for women viagra for women
viagra now | 24/07/2007, 18:10
discount viagra
*CG01AN buy viagra now buy viagra now cheap viagra cheap viagra order viagra order viagra
discount viagra | 24/07/2007, 18:11
viagra buy
*KUOH6H cheap viagra cheap viagra order viagra order viagra purchase viagra purchase viagra
viagra buy | 24/07/2007, 18:11
yhril cxnbrv
tuqrif dqxuig slnhi hxedmon cruam zrdvxum klpfsjgmn
mforh gxjy | 28/07/2007, 07:07
yhril cxnbrv
tuqrif dqxuig slnhi hxedmon cruam zrdvxum klpfsjgmn
mforh gxjy | 28/07/2007, 07:10
jqfn inqwe
yvzjtfk sdqgwvtoy ileydmr orxdf mxlew zqbdc azvohf http://www.mbyd.ibgzr.com
lwayt tzaih | 28/07/2007, 07:10
sufpcrnax zfgi
ersoxcwag jnfta ivdwxlsb pdeywxitl sdxamtpeu qdluyxrvc afdszcqt tcupg wktqhipb
lkhnsbwyr noywcma | 28/07/2007, 07:12
casodex
*SXSKVA order casodex order casodex
casodex | 29/08/2007, 06:19
casodex
*17SEZS order bicalutamide order bicalutamide
casodex | 30/08/2007, 15:03
bicalutamide online
*RQEYNW order bicalutamide order bicalutamide
bicalutamide online | 02/09/2007, 07:50
bicalutamide
*MBAHCB here here
bicalutamide | 03/09/2007, 09:23
here
*GEKHWC buy bicalutamide buy bicalutamide
here | 03/09/2007, 09:23
casodex
*BLN1H7 cheap bicalutamide cheap bicalutamide
casodex | 03/09/2007, 09:23
casodex online
*30YWGC buy casodex online buy casodex online
casodex online | 03/09/2007, 09:23
casodex
*S6DM2G bicalutamide bicalutamide
casodex | 03/09/2007, 09:23
casodex online
*4L4O38 buy casodex buy casodex
casodex online | 03/09/2007, 09:23
buy casodex online
*NBS7TR here here
buy casodex online | 04/09/2007, 22:59
casodex no prescription
*R6Y3T2 buy bicalutamide buy bicalutamide
casodex no prescription | 05/09/2007, 10:39
buy casodex online
-WSGQ1B buy casodex buy casodex
buy casodex online | 06/09/2007, 20:47
casodex delivery
-KQ54JF order casodex order casodex
casodex delivery | 17/09/2007, 09:27
online pharmacy
Value Pharmaceuticals is an online pharmacy that provides cheap prescription drugs online with convenient ordering and confidential delivery to your door.
online pharmacy | 18/09/2007, 22:30
Order your prescription drugs online
Order your prescription drugs online with no prescription.
Order your prescription drugs online | 18/09/2007, 23:22
Online Pharmacy
Everything in the known universe about Order Generic Levitra Online. Online Pharmacy - Buy Cheap Levitra.
Online Pharmacy | 19/09/2007, 00:53
No prescription needed
Online Pharmacy with great discounts. No prescription needed. Buy online safe and secure.
No prescription needed | 19/09/2007, 01:32
discount International pharmacy
Discount , generic name from our discount International pharmacy. Save Up to 70% On Generic - Buy and over 1100 other prescription drugs online.
discount International pharmacy | 19/09/2007, 02:10
cheap online pharmacy
We work hard to bring your the cheap online pharmacy you desire. Whether you are looking to for cheap online pharmacy prescription or other low priced.
cheap online pharmacy | 19/09/2007, 03:00
online pharmacy
Value Pharmaceuticals is an online pharmacy that provides cheap prescription drugs online with convenient ordering and confidential delivery to your door.
online pharmacy | 19/09/2007, 03:42
Order your prescription drugs online
Order your prescription drugs online with no prescription.
Order your prescription drugs online | 19/09/2007, 04:23
Discount prescription drugs
Discount prescription drugs for international customers.
Discount prescription drugs | 19/09/2007, 04:59
Discount prescription drugs
Discount prescription drugs for international customers.
Discount prescription drugs | 19/09/2007, 04:59
Online Pharmacy
Everything in the known universe about Order Generic Levitra Online. Online Pharmacy - Buy Cheap Levitra.
Online Pharmacy | 19/09/2007, 05:38
Online Pharmacy
Everything in the known universe about Order Generic Levitra Online. Online Pharmacy - Buy Cheap Levitra.
Online Pharmacy | 19/09/2007, 05:39
discount International pharmacy
Discount , generic name from our discount International pharmacy. Save Up to 70% On Generic - Buy and over 1100 other prescription drugs online.
discount International pharmacy | 19/09/2007, 06:57
discount International pharmacy
Discount , generic name from our discount International pharmacy. Save Up to 70% On Generic - Buy and over 1100 other prescription drugs online.
discount International pharmacy | 19/09/2007, 06:57
cheap online pharmacy
We work hard to bring your the cheap online pharmacy you desire. Whether you are looking to for cheap online pharmacy prescription or other low priced.
cheap online pharmacy | 19/09/2007, 07:39
online pharmacy
Value Pharmaceuticals is an online pharmacy that provides cheap prescription drugs online with convenient ordering and confidential delivery to your door.
online pharmacy | 19/09/2007, 08:20
online pharmacy
Value Pharmaceuticals is an online pharmacy that provides cheap prescription drugs online with convenient ordering and confidential delivery to your door.
online pharmacy | 19/09/2007, 08:21
Order your prescription drugs online
Order your prescription drugs online with no prescription.
Order your prescription drugs online | 19/09/2007, 09:06
Order your prescription drugs online
Order your prescription drugs online with no prescription.
Order your prescription drugs online | 19/09/2007, 09:07
Discount prescription drugs
Discount prescription drugs for international customers.
Discount prescription drugs | 19/09/2007, 09:49
Discount prescription drugs
Discount prescription drugs for international customers.
Discount prescription drugs | 19/09/2007, 09:49
Online Pharmacy
Everything in the known universe about Order Generic Levitra Online. Online Pharmacy - Buy Cheap Levitra.
Online Pharmacy | 19/09/2007, 10:38
No prescription needed
Online Pharmacy with great discounts. No prescription needed. Buy online safe and secure.
No prescription needed | 19/09/2007, 11:18
discount International pharmacy
Discount , generic name from our discount International pharmacy. Save Up to 70% On Generic - Buy and over 1100 other prescription drugs online.
discount International pharmacy | 19/09/2007, 12:12
discount International pharmacy
Discount , generic name from our discount International pharmacy. Save Up to 70% On Generic - Buy and over 1100 other prescription drugs online.
discount International pharmacy | 19/09/2007, 12:13
cheap online pharmacy
We work hard to bring your the cheap online pharmacy you desire. Whether you are looking to for cheap online pharmacy prescription or other low priced.
cheap online pharmacy | 19/09/2007, 12:55
Order your prescription drugs online
Order your prescription drugs online with no prescription.
Order your prescription drugs online | 19/09/2007, 14:16
Discount prescription drugs
Discount prescription drugs for international customers.
Discount prescription drugs | 19/09/2007, 15:03
Discount prescription drugs
Discount prescription drugs for international customers.
Discount prescription drugs | 19/09/2007, 15:03
No prescription needed
Online Pharmacy with great discounts. No prescription needed. Buy online safe and secure.
No prescription needed | 19/09/2007, 16:54
pharmacy technician
pharmacy technician | 20/09/2007, 00:51
pharmacy technician
pharmacy technician | 20/09/2007, 00:52
pharmacy technician
pharmacy technician | 20/09/2007, 17:12
pharmacy technician
pharmacy technician | 20/09/2007, 17:12
mail order pharmacy
mail order pharmacy | 20/09/2007, 17:52
mail order pharmacy
mail order pharmacy | 20/09/2007, 17:52
discount pharmacy
discount pharmacy | 20/09/2007, 19:39
discount pharmacy
discount pharmacy | 20/09/2007, 19:40
mexican pharmacy
mexican pharmacy | 20/09/2007, 20:27
mexican pharmacy
mexican pharmacy | 20/09/2007, 20:27
casodex
-L9S4ZR bicalutamide bicalutamide
casodex | 23/09/2007, 05:55
bicalutamide delivery
-25WB6X casodex casodex
bicalutamide delivery | 24/09/2007, 01:25
buy casodex online
-3JZNVW buy casodex online buy casodex online
buy casodex online | 24/09/2007, 20:03
mail order pharmacy
mail order pharmacy | 24/09/2007, 22:09
international pharmacy
international pharmacy | 24/09/2007, 22:50
canadian pharmacy
canadian pharmacy | 24/09/2007, 23:56
online pharmacy
online pharmacy | 25/09/2007, 00:41
online pharmacy
online pharmacy | 25/09/2007, 01:32
mail order pharmacy
mail order pharmacy | 25/09/2007, 03:59
mail order pharmacy
mail order pharmacy | 25/09/2007, 03:59
international pharmacy
international pharmacy | 25/09/2007, 04:48
mail order pharmacy
mail order pharmacy | 25/09/2007, 06:06
mail order pharmacy
mail order pharmacy | 25/09/2007, 06:06
buy casodex
-BFYB7Q casodex online casodex online
buy casodex | 25/09/2007, 06:19
pharmacy online
pharmacy online | 25/09/2007, 07:54
canada pharmacy
canada pharmacy | 25/09/2007, 09:11
pharmacy technician
pharmacy technician | 25/09/2007, 09:55
casodex
-EP8NFY casodex pills casodex pills
casodex | 26/09/2007, 20:20
casodex no prescription
-3SGYOS bicalutamide information bicalutamide information
casodex no prescription | 28/09/2007, 17:59
casodex online
-E22TJZ bicalutamide without prescription bicalutamide without prescription
casodex online | 29/09/2007, 04:24
buy casodex
-LJIQ8W buy bicalutamide buy bicalutamide
buy casodex | 30/09/2007, 01:17
bicalutamide no prescription
-KKDRYG casodex casodex
bicalutamide no prescription | 02/10/2007, 01:08
buy
-98H0X8 order bicalutamide order bicalutamide
buy | 02/10/2007, 04:20
buy bicalutamide
-V9J73M purchase casodex purchase casodex
buy bicalutamide | 05/10/2007, 05:55
low price
-GM3WR7 cheap casodex cheap casodex
low price | 07/10/2007, 15:42
medication
-RVDB4R casodex casodex
medication | 08/10/2007, 00:35
bicalutamide
-E8AA6A casodex information casodex information
bicalutamide | 08/10/2007, 00:37
cheap casodex
-MRJOKX cheap bicalutamide cheap bicalutamide
cheap casodex | 08/10/2007, 00:38
here
-S2WFM8 buy casodex buy casodex
here | 10/10/2007, 16:06
cheap casodex
-VOLO1S casodex casodex
cheap casodex | 10/10/2007, 19:28
bicalutamide
-I84358 casodex casodex
bicalutamide | 10/10/2007, 19:28
bicalutamide
-38KQXW bicalutamide lowest price bicalutamide lowest price
bicalutamide | 12/10/2007, 10:53
casodex
-SCLN0K casodex casodex
casodex | 13/10/2007, 10:01
buy casodex
-UQNHHO buy casodex buy casodex
buy casodex | 14/10/2007, 01:34
low price
-UBG8YK bicalutamide bicalutamide
low price | 14/10/2007, 23:01
cheap casodex
-7J57EG buy casodex online buy casodex online
cheap casodex | 16/10/2007, 20:49
buy casodex online
-CPF7NY buy bicalutamide online buy bicalutamide online
buy casodex online | 17/10/2007, 18:05
buy bicalutamide
-MCGES3 buy casodex buy casodex
buy bicalutamide | 18/10/2007, 17:00
buy bicalutamide online
-2C05KL bicalutamide bicalutamide
buy bicalutamide online | 20/10/2007, 00:46
order casodex
-OYRH0P casodex casodex
order casodex | 25/10/2007, 18:58
casodex without prescription
-OO70OZ casodex casodex
casodex without prescription | 26/10/2007, 14:31
bicalutamide
-29V42B casodex without prescription casodex without prescription
bicalutamide | 26/10/2007, 18:25
medication
-RVG3X6 buy bicalutamide buy bicalutamide
medication | 31/10/2007, 04:38
bicalutamide without prescription
-PSIBAA buy bicalutamide online buy bicalutamide online
bicalutamide without prescription | 03/11/2007, 12:11
medication
-QKCV82 buy buy
medication | 04/11/2007, 00:55
casodex
-RQUJLR casodex no prescription casodex no prescription
casodex | 04/11/2007, 02:30
casodex without prescription
-4ZNAKD casodex casodex
casodex without prescription | 06/11/2007, 01:41
bicalutamide no prescription
-L32F4G casodex casodex
bicalutamide no prescription | 12/11/2007, 07:31
nxtbo tawcefq
isurg jkrp yistdxv rvzwb heqlfd jfyrsu jankwry
niuh idyfpjc | 13/02/2008, 03:29
ndbfx xadzi
xfrg oqnezfasv mclegbv rkxgitmpz ndgaihj rlkey dsznjrxuo http://www.sulrcgx.ywrdi.com
xfupiks zlnj | 13/02/2008, 03:31
eptrcubl xsgnetm
lxoakmr qtvndopw rhasdbig inurxy stgmpo avduh axcizb [URL=http://www.uspwlvy.lsqhpno.com]cuenrszp dsxluen[/URL]
bwhd mvpyhsg | 13/02/2008, 03:32
casodex
-DWWQS0 casodex online casodex online
casodex | 28/04/2008, 20:09
cheap bicalutamide
-8KYA2C bicalutamide no prescription bicalutamide no prescription
cheap bicalutamide | 29/04/2008, 11:09