Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ѹËõÎļþÀà

½ñÌìÑо¿ÁËÒ»ÏÂÔÚasp.netÏÂÓÃC#ÓïÑÔѹËõÎļþ£¬ºÍ½âѹÎļþ£¬ÔÚÍøÉϺÃÁ˺þòÅÕÒµ½Ô´´úÂ룬£¬Õæ²»ÈÝÒ×°¡£¡£¡
ÔÚ ASP.NET ÖÐÓÐÁ½¸öÀࣺDeflateStream ºÍ GZipStream ÓÃÓÚ´¦ÀíѹËõºÍ½âѹËõ£¬ÕâÁ½¸öÀà·Ö±ðʹÓõÄÊÇ DEFLATE ºÍ gzip ѹËõËã·¨£¬ÕâÁ½¸öËã·¨±»Ò»Ð©Ñ¹ËõÈí¼þÖ§³Ö£¬±ÈÈç WinRAR ¾ÍÖ§³Ö gzip¡£ÕâÁ½¸öÀàµÄÃû³Æ¿Õ¼ä¾ùΪ£ ......

C#(ASP.Net)»ñÈ¡µ±Ç°Â·¾¶µÄ·½·¨¼¯ºÏ

//»ñÈ¡µ±Ç°½ø³ÌµÄÍêÕû·¾¶£¬°üº¬ÎļþÃû(½ø³ÌÃû)¡£  
string str = this.GetType().Assembly.Location;  
result: X:\xxx\xxx\xxx.exe (.exeÎļþËùÔÚµÄĿ¼+.exeÎļþÃû)  
//»ñÈ¡Ð嵀 Process ×é¼þ²¢½«ÆäÓ뵱ǰ»î¶¯µÄ½ø³Ì¹ØÁªµÄÖ÷Ä£¿éµÄÍêÕû·¾¶£¬°üº¬ÎļþÃû(½ø³ÌÃû)¡£  
s ......

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ÐÔÄÜÓÅ»¯

(Ò»).Ñ¡Ôñ»á»°×´Ì¬´æ´¢·½Ê½
    ÔÚWebconfigÎļþÅäÖÃ:
    <sessionState mode="???" stateConnectionString="tcpip=127.0.0.1:42424"
         sqlConnectionString="data source=127.0.0.1;Trusted_Connection=y ......

ASP.NETÕýÔò±í´ïʽ¼¯ºÏ

ASP.NETÕýÔò±í´ïʽ¼¯ºÏ    
1.ÕʺÅÓÉa¡«zµÄÓ¢ÎÄ×Öĸ(²»Çø·Ö´óСд)¡¢0¡«9µÄÊý×Ö¡¢µã¡¢¼õºÅ»òÏ»®Ïß×é³É£¬³¤¶ÈΪ
3¡«18¸ö×Ö·û£¬ÀýÈç:kyzy_001
^[a-zA-Z0-9.-_]{3,18}$
2.ÊäÈë¿òÀï±ØÐëΪÊý×Ö
^[0-9]{1,}$
3.µç×ÓÓʼþ¸ñʽ
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
4.ÒªÇóÎı¾¿òÖ»ÄÜÊäÈë×î¶à ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ