ASP.NETÖÐGridView·ÖÒ³
·½·¨Ò»:
н¨Ò»¸öÒ³ÃæÈ»ºóÔÚÒ³ÃæÍÏÒ»¸öGridView¿Ø¼þÔÚÊôÐÔ¿òÖÐÉèÖÃGridView¿Ø¼þµÄAllowPaingÊôÐÔΪTrue È»ºóÔÙÉèÖÃGridViewµÄPageSizeÊôÐÔ,Ô´ÎļþÈçÏÂ:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames ="classId" CellPadding="5" OnRowDeleting="GridView1_RowDeleting" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" PageSize ="15">
<Columns>
<asp:BoundField DataField ="className" HeaderText ="Ãû³Æ" />
<asp:BoundField DataField="classDes" HeaderText="ÃèÊö" SortExpression="classDes" />
</Columns>
<PagerTemplate>
<table style="font-size :12px;">
<tr>
<td> ×ܹ²<asp:Label ID="Label1" runat="server" Text="<%#((GridView)Container.NamingContainer).PageCount %>"></asp:Label>Ò³ </td>
<td> µÚ<asp:Label ID="Label2" runat="server" Text="<%#((GridView)Container.NamingContainer).PageIndex+1 %>"></asp:Label>Ò³ </td>
&n
Ïà¹ØÎĵµ£º
¡¡1. Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯
¡¡¡¡Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
¡¡¡¡·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄܵÄÓ°Ï졣ϵͳ½«Óû§µÄÊý¾Ý¿âÁ¬½Ó·ÅÔÚÁ¬½Ó³ØÖУ¬ÐèҪʱȡ³ö£¬¹Ø± ......
ǰ̨:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
......
Ò». ʹÓÃQueryString±äÁ¿
¡¡¡¡¡¡¡¡QueryStringÊÇÒ»Öַdz£¼òµ¥Ò²ÊÇʹÓñȽ϶àµÄÒ»ÖÖ´«Öµ·½Ê½£¬µ«ÊÇËü½«´«µÝµÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖÐ,Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṹ¼òµ¥µÄÊýֵʱ£¬¿ÉÒÔʹÓÃÕâ¸ö·½·¨¡£
Response.Redirect( "target.aspx?param1=hello& ......
1.µ¯³ö¶Ô»°¿ò.
a. µ¯³ö¶Ô»°¿ò£º
C# codeClientScript.RegisterStartupScript(this.GetType(), "",
"<script>window.alert('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡')</script>");
b.תÏòÖ¸¶¨Ò³Ãæ
C# code Response.Write("
<script>window.location='http://www. ......
»º´æµÄÖØÒªÐԾͲ»ÓÃÔÙÇ¿µ÷ÁË£¬@OutputCache¸øÎÒÃÇÌṩÁËÒ»ÖÖÉùÃ÷µÄ·½Ê½(¶ÔÓ¦µÄ»¹Óбà³ÌµÄ·½Ê½)À´¿ØÖÆÒ³ÃæºÍÓû§¿Ø¼þµÄ»º´æ²ßÂÔ£¬ÕâÊÇÒ»ÖÖ×î¼òµ¥Ö±½ÓµÄÍøÕ¾ÓÅ»¯·½Ê½¡£
»¹ÊÇÏÈÀ´¹ýÒ»±é@OutpuCacheËùÓеÄÊôÐÔ£¬¹²ÓÃ11¸öÊôÐÔ£¬Õâ¸öÖ¸Áî¿ÉÒÔÓÃÓÚÒ³Ãæ(.aspx)ºÍÓû§¿Ø¼þ(.ascx)
ÊôÐÔ
Duration
Ò³»òÓû§¿Ø¼þ½øÐлº´æµÄʱ¼ä£¬µ¥Î ......