Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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>Ò³ &nbsp; </td>
               
                    <td> µÚ<asp:Label ID="Label2" runat="server" Text="<%#((GridView)Container.NamingContainer).PageIndex+1 %>"></asp:Label>Ò³ &nbsp;</td>
                
 &n


Ïà¹ØÎĵµ£º

asp.netÁ´½Ósqlserver2000¡¢2005¡¢access´úÂë

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ÖзþÎñ¶Ë¿Ø¼þʼþÊÇÈçºÎ´¥·¢µÄ

 
 
 
 
 Asp.net ÖÐÔÚ¿Í»§¶Ë´¥·¢·þÎñ¶Ëʼþ·ÖΪÁ½ÖÖÇé¿ö£º
Ò». WebControlsÖеÄButton ºÍHtmlControlsÖеÄTypeΪsubmitµÄHtmlInputButton
ÕâÁ½ÖÖ°´Å¥×îÖÕµ½¿Í»§¶ËµÄ±íÏÖÐÎʽΪ£º < input name="Submit1" id="Submit1" type="submit" value=”Submit”>£¬ÕâÊÇForm±íµ¥µÄÌ ......

Asp.net ÖÐ CookieµÄʹÓ÷½·¨

·½·¨1:
±ÈÈ罨Á¢Ò»¸öÃûΪcnlive£¬ÖµÎª"123"µÄcookie
HttpCookie cookie = new HttpCookie["cnlive"];
cookie.Value = "123";
Response.AppendCookie(cookie);
È¡¸Õ²ÅдÈëµÄCookieÖµ:
HttpCookie cookie = Request.Cookies["cnlive"];
cookieValue = cookie.Value;
ÔÚÒ»¸öCookieÖд¢´æ¶à¸öÐÅÏ¢:
HttpCookie cookie ......

asp.net³£Óôú碼


1.µ¯³ö¶Ô»°¿ò.
  a. µ¯³ö¶Ô»°¿ò£º
 
C# codeClientScript.RegisterStartupScript(this.GetType(), "",
"<script>window.alert('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡')</script>");
  b.תÏòÖ¸¶¨Ò³Ãæ
 
C# code Response.Write("
<script>window.location='http://www. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ