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

ÓÃAspNetPagerºÍViewState·Ö±ðʵÏÖasp.net·ÖÒ³

ÒÔϽéÉÜÁ½ÖÖ·ÖÒ³£¬ÓÃAspNetPagerºÍViewState
Ò».AspNetPagerµÄÓ÷¨
1. ¸´ÖÆAspNetPager.dllµ½binĿ¼£¬ÔÚ¹¤¾ßÏä->Ñ¡ÔñÏî->ä¯ÀÀ£¬Ìí¼ÓbinϵÄÒýÓá£
2. ´Ó¹¤¾ßÏäÍϸöAspNetPager£¬¸ÄÈçÏÂÊôÐÔ£º
    PageSize--ÿҳÏÔʾµÄ¼Ç¼Êý
    CustomInfoHTML--×Ô¶¨ÒåÏÔʾÎı¾£¬Ò»°ãΪ“µÚ%CurrentPageIndex%Ò³ ¹²%PageCount%Ò³”
    ShowCustomInfoSection--ÏÔʾµ±Ç°Ò³ºÍ×ÜÒ³ÊýÐÅÏ¢£¬ÖµÎªNever£¬Right£¬Left
    AlwaysShow--×ÜÊÇÏÔʾ·ÖÒ³¿Ø¼þ
    PageIndexBoxType--Ö¸¶¨Ò³Ë÷Òý¿òµÄÏÔʾÀàÐÍ£¬ÖµÎªÎı¾¿ò£¬ÏÂÀ­Áбí¿ò
    ShowPageIndexBox--Ö¸¶¨Ò³Ë÷Òý¿òµÄÏÔʾ·½Ê½£¬ÖµÎªAlways£¬Never£¬Auto
    TextAfterPageIndexBox--Ò³Ë÷Òý¿òºóµÄÎı¾ÄÚÈÝ£¬Ò»°ãΪ“Ò³”
    TextBeforePageIndexBox--Ò³Ë÷Òý¿òǰµÄÎı¾ÄÚÈÝ£¬Ò»°ãΪ“תµ½”
ÏÔʾÈçÏÂ
3. ÔÚAspNetPagerµÄPageChangedʼþÖÐдÈçÏ´úÂ룺
     protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        Databind();
    }
    private void Databind()
    {
        PagedDataSource pds = new PagedDataSource();
        pds.DataSource = List<T>;
        pds.AllowPaging = true;
        pds.PageSize = AspNetPager1.PageSize;        //AspNetPager1ÊÇID
        AspNetPager1.RecordCount = pds.DataSourceCount;
        pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
        GridView1.DataSource = pds;        //°ó¶¨µ½GridView
        GridView1.DataBind();
    }
¶þ. ViewState
  1.Ëĸö°´Å¥´¥·¢ÒÔÏÂ


Ïà¹ØÎĵµ£º

ASP.NETµÄWeb.configÎļþ

Web.configÎļþÊÇÒ»¸ö±ê×¼µÄXMLÎĵµ£¬ËùÓеÄÅäÖÃÐÅÏ¢¶¼Î»ÓÚ<configuration>±ê¼ÇÄÚ¡£<system.web>±ê¼ÇÄÚÔò°üº¬Á˺ËÐÄASP.NETÅäÖÃÉèÖá£Óû§¿ÉÒÔÔÚVisual Studio.NETÖдò¿ªWeb.configÀ´²é¿´ºÍ±à¼­ËüµÄÄÚÈÝ£¬Õâ¸öÎļþÖаüº¬ÁË´óÁ¿µÄ×¢ÊÍÐÅÏ¢£¬Óû§¿ÉÒÔ²ÎÕÕѧϰ¡£ÏÂÃæ½éÉܼ¸¸ö³£Óõıê¼Ç¡£
1. <appSettings> ......

Asp.NetÇå¿ÕÒ³ÃæËùÓÐtextboxµÄ¼¸ÖÖ·½·¨×ܽá

Asp.NetÇå¿ÕÒ³ÃæËùÓÐtextboxµÄ¼¸ÖÖ·½·¨×ܽá
 ÔÚAsp.NetÖÐÇå¿ÕËùÓÐtextboxÓкü¸ÖÖ·½·¨£¬±¾ÎÄÌṩ¼¸ÖÖ£¬¹©´ó¼Ò²Î¿¼£¡
 
foreach( Control childControl in this.Controls )  
{  
if( childControl is TextBox )  
((TextBox)childControl).Text = "";  
}&n ......

´òÓ¡¾Ö²¿Ò³Ãæ Asp.net ´òÓ¡¾Ö²¿Ò³Ãæ


´òÓ¡¾Ö²¿Ò³Ãæ
 
 
1. window.print(); ´òÓ¡
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><input class="NOPRINT" type="button" onclick="window ......

ÂÛASP.NETÉè¼ÆÖеÄÐÔÄÜÓÅ»¯ÎÊÌâ

¹ØÓÚÊý¾Ý´¦ÀíÏà¹ØµÄÓÅ»¯  
   
  Ò»¡¢                           SqlDataReadºÍDatasetµÄÑ¡Ôñ  
   
  SqldatareadÓŵ㣺¶ÁÈ¡Êý¾Ý·Ç³£¿ì¡£Èç¹û¶Ô·µ»ØµÄÊý¾Ý²»Ðè×ö´óÁ¿´¦ÀíµÄÇé¿öÏ£ ......

ÖØÖÃASP.NET¡¡membership¼ÓÃܺóµÄÃÜÂë

ÕâÀïÎÒֻժȡÁËÔ­ÎĵÄCodeÒÔ¹©Ç±ÐÄÑо¿.using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Configuration;
using System.Data.SqlClient;
using System.Web.Security;
using System.Data;
public ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ