asp ·Ò³ÔõôʵÏÖ£¿ - .NET¼¼Êõ / ASP.NET
asp ·Ò³ÔõôʵÏÖ£¿
·ÖÒ³¿ÉʹÓ÷ÖÒ³¿Ø¼þÈçaspnetpager
ûÕÒµ½´Ë¿Ø¼þ£¡£¡£¡£¡£¡
µÚÈý·½×é¼þ ÐèÒªÔÚÍøÉÏÈ¥ÏÂÔØ http://www.webdiyer.com/Controls/AspNetPager/Downloads
²»Óÿؼþ Ôõô×ö°¡£¡
hehe
²»Óÿؼþ¿ÉÒÔ×Ô¼ºÐ´·ÖÒ³¿Ø¼þ£¬ÔÚ´æ´¢¹ý³ÌÖÐÿ´Î»ñÈ¡Ö¸¶¨Ò³ÊýµÄÊý¾Ý²¢·µ»Ø¡£Ò²¿ÉÒÔÓÃgridview×Ô´øµÄ·ÖÒ³¹¦ÄÜ£¬Õâ¸ö²»ÓÃд´úÂë¡£
²»Óÿռä¾ÍÓô洢¹ý³Ì·ÖÒ³°É¡£¡£¡£
C# code:
²âÊÔ£º15ÍòÌõÊý¾Ý,ÓÃʱ1s.
--=====µ÷ÓÃʾÀý====
declare @str varchar(200);
set @str = 'select * from t_user order by id'
exec pagination @str,4,2
--=====´æ´¢¹ý³Ì======
create procedure pagination
@sqlstr nvarchar(4000), --²éѯ×Ö·û´®
@currentpage int, --µÚNÒ³
@pagesize int --ÿҳÐÐÊý
as
set nocount on
declare @P1 int, --P1ÊÇÓαêµÄid
@rowcount int
exec sp_cursoropen @P1 output,@sqlstr,@scrollopt=1,@ccopt=1,@rowcount=@rowcount output
declare @totalPage int --×ÜÒ³Êý
set @totalpage = ceiling(1.0*@rowcount/@pagesize)
--Åжϵ±Ç°Ò³ÊÇ·ñ´óÓÚ×ÜÒ³Êý,Èç¹û´óÓÚ×ÜÒ³Êý.µ±Ç°Ò³¾ÍÊÇ×îºóÒ»Ò³
if (@currentpage>=@totalpage)
set @currentpage = @totalpage
if(@currentpage<1) --Èç¹ûµ±Ç°Ò³Ð¡ÓÚ1,ÔòĬÈϵ±Ç°Ò³ÊÇ1
set @currentpage=1
print 'µ±Ç°Ò³'
print @currentpage
select @totalpage as ×ÜÒ³Êý,@currentpage as µ±Ç°Ò³ ,@rowcount as ×ܼǼÊý--,@rowcount as ×ÜÐÐÊý,@current
Ïà¹ØÎÊ´ð£º
function CheckOpwd(){//ÑéÖ¤Óû§Ãû
var pwd=document.all.txtOpwd;
var div1=document.getElementById("divPwd");
if (pwd.value=="")
{
......
C# code:
SqlConnection conn = CsDB.sqlcon();
SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......
±¾È˹¤×÷¾ÑéÒ»ÄêÒÔÉÏ
ÊìϤasp.net
ÊìϤjavascript
ÊìϤCss
ÊìϤajax
ÊìϤsqlserver2005
ÓÐÒ»ÄêµÄÏîÄ¿¾Ñé
¾ßÌåÏîÄ¿ºÍÆäËûµÄ¾Í²»ÔÚÕâдÁË
ÓÐÒâÕßÁªÏµ£º
QQ:359233910
ÒýÓÃ
±¾È˹¤×÷¾ÑéÒ»ÄêÒÔÉÏ
ÊìϤasp ......
ÎÒÓÐÁ½¸ödropdownlist¶¼°óºÃÁËÖµ£¬ÏëÑ¡ÖÐÒ»¸ödropdownlistÖеÄÖµ£¬È»ºóÔÚÁíÒ»¸ödropdownlistÖÐÑ¡ÖÐÏàÓ¦µÄÒ»Ïî¡£
²»ÊÇ´Óа󶨵ڶþ¸ödropdownlist£¬ÊÇÔÚÒѾ°óºÃµÄÖµµ±ÖÐÑ¡ÖÐÒ»¸ö¡£
ÎÒÏëÓÃjsд
ÇóÖú
Äã¿ÉÒÔ°Ñdrop ......
ÏÖÓÐÒ»¸ö±í¸ñ£¬ÓкܶàÐÐÊý×é¡£
ÏëÒªÒ»¸ö½Å±¾£¬¶ÁÈ¡ËùÓÐÐеÄÊý×éºóÊä³ö¡£
Êä³öÇ°²»ÏÔʾÕý³£Ë³ÐòµÄ±í¸ñÊý×飬¶øÖ±½ÓÏÔʾ³ö¶ÁÈ¡ºóµÄÊý×é¡£
Â¥Ö÷µÄ±í´ïʵÔÚ³ÉÎÊÌ⣡£¡
ÊDz»ÊÇÕâ¸öÒâ˼£¿
<%
Dim ArrDNA£¨10£¬10£ ......