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
Ïà¹ØÎĵµ£º
Data Source=sqlservername;Initial Catalog=dbname;User ID=userid;Password=userpwd
Data Source=(local)\\SQLEXPRESS;Initial Catalog=Êý¾Ý¿âÃû;Integrated Security=True
Data Source=(local);Initial Catalog=Êý¾Ý¿âÃû;User ID=ÕʺÅ;Password=ÕʺÅÃÜÂë
Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\BegASPNET\ ......
asp.netÖГÏß³ÌÕý±»ÖÐÖ¹”Òì³£µÄ½â¾ö·½·¨
ÔÚÏîÄ¿À︺ÔðÒì³£´¦Àí²¿·Ö£ºÒì³£ÐÅÏ¢µÄдÈ룬¶ÁÈ¡£¬²é¿´£¬Òò´Ë¾Í¿ÉÒÔ¿´µ½¸÷ÖÖÒì³££¬ÊÜÒæ·Ëdz
¿´µ½ÓÐN¶àµÄ“Ïß³ÌÕý±»ÖÐÖ¹”Òì³££¬¶øÇÒÀ´×Ôͬһ¸öÒ³Ãæ¡£
System.Threading.ThreadAbortException: Ïß³ÌÕý±»ÖÐÖ¹¡£
at System.Threading.Thread.AbortInternal( ......
Asp.net ÖÐÔÚ¿Í»§¶Ë´¥·¢·þÎñ¶Ëʼþ·ÖΪÁ½ÖÖÇé¿ö£º
Ò». WebControlsÖеÄButton ºÍHtmlControlsÖеÄTypeΪsubmitµÄHtmlInputButton
ÕâÁ½ÖÖ°´Å¥×îÖÕµ½¿Í»§¶ËµÄ±íÏÖÐÎʽΪ£º < input name="Submit1" id="Submit1" type="submit" value=”Submit”>£¬ÕâÊÇForm±íµ¥µÄÌ ......
¡¡1. Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯
¡¡¡¡Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
¡¡¡¡·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄܵÄÓ°Ï졣ϵͳ½«Óû§µÄÊý¾Ý¿âÁ¬½Ó·ÅÔÚÁ¬½Ó³ØÖУ¬ÐèҪʱȡ³ö£¬¹Ø± ......
Ó°ÏìASP.NetÓ¦ÓÃÐÔÄܵÄÅäÖÃ
1¡¢É¾³ý²»±ØÒªµÄHttpModule£¬Ã¿Ôö¼ÓÒ»¸öHttpModule£¬Ã¿¸öÇëÇó´¦Àí¾Í¶àÒ»µã¿ªÏú¡£
È磺
<httpModules>
& ......