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

ÔÚASP.netÖÐʹÓö¯Ì¬¿Ø¼þ

¾­³£¼ûµ½ÓÐÈË˵ÔÚASP.netÖв»ÒªÊ¹Óö¯Ì¬¿Ø¼þ,ÎÒÏëÖ÷ÒªµÄÔ­ÒòÔÚÓÚʹÓö¯Ì¬¿Ø¼þ»á´øÀ´Ò»Ð©ÎÊÌâ,ÔÚ×öÏîÄ¿µÄ¹ý³ÌÖÐ,ÎÒ½«Óɶ¯Ì¬¼ÓÔؿؼþÒý·¢µÄ×ÜÊÇ×÷ÁËÒ»¸öССµÄ×ܽá.
    1 ¡¢ÔÚʹÓÃLoadControl¼ÓÔؿؼþºó,Óû§¿Ø¼þÖеÄijЩ¿Ø¼þ²»ÔÙÏìӦʼþ¡£
    Õâ¸öÎÊÌâÖ÷ÒªÊÇÓÉÓÚ½«¿Ø¼þ¼ÓÔØ·ÅÔÚif (!Page.IsPostBack)Ö®ÄÚÒýÆðµÄ,·ÅÔÚÍâÃæ¼´¿É¡£ÔÚ˼¹éµÄblogÉ϶ԴËÎÊÌâ½øÐÐÁËÏêϸµÄ˵Ã÷¡£
    2¡¢Óû§¿Ø¼þÖÐijЩ¿Ø¼þµÄÏìÓ¦³öÏÖÎÊÌ⣬Èçij¸ö°´Å¥µÚÒ»´ÎÑ¡Ôñʱ²»´¥·¢CLICKʼþ£¬µÚ¶þ´Î¿ÉÒÔÁË¡£
    ÕâÊÇÓÉÓÚûÓиø¿Ø¼þÉèÖÃIDÒýÆðµÄ£¬¿Ø¼þIDµÄ×÷ÓÃÔÚÏÂÃæÏêϸ½²Êö¡£ Èç
    Control  userControl=(Control)Page.LoadControl(“Test.ascx”);
    userControl.ID=“Test”;
    AddControl(userControl);
    3¡¢Èç¹ûÓû§¿Ø¼þÖаüÀ¨DataGrid¿Ø¼þ£¬ÄÇô¼ÓÔؿؼþºó¿ÉÄܳöÏÖ²»ÏìÓ¦DataGridʼþµÄÎÊÌâ¡£
    ÕâºÃÏñÊÇÒ»¸öbug,±ØÐëÒª½«¼ÓÔصĿؼþ½øÐÐÇ¿ÖÆת»»£¬È磺
    Test userControl=(Test)Page.LoadControl(“Test.ascx”);
    ×¢Ò⣺ÉÏÃæʹÓõÄÊÇTestÀàÐÍ£¬¶ø²»ÊÇControl!
    ÎÒÔÚÒÔÇ°µÄBlogÖÐÔøÌáµ½¹ýÕâ¸öÎÊÌ⣬ÕâÖÖ·½Ê½½«Ê¹ÏµÍ³µÄÀ©Õ¹ÐÔ½µµÍ¡£ ÎÒÓÐÒ»¸ö½â¾ö·½°¸¿ÉÒԺʹó¼ÒÌÖÂÛ(ÔËÓòßÂÔģʽ)£º
    public class BaseControl : System.Web.UI.UserControl
    {
    public virtual BaseControl  ProcessThisControl();
    }
    ËùÓеÄÓû§¿Ø¼þ´ÓBaseControl ¼Ì³Ð£¬Èç¹ûÓÐDatagrid¿Ø¼þ£¬ÓÉoveride ProcessThisControl·½·¨ ,È磺
    return this as Test;
    °´ÈçÏ·½Ê½¼ÓÔؿؼþ£º
    BaseControl  userControl=(BaseControl  )Page.LoadControl(“Test.ascx”);
    userControl.ProcessThisControl();
    4¡¢ÔÚÓû§¿Ø¼þÖÐÈçºÎʹÓÃJavaScript¡£
    ´ó¼Ò¶¼ÖªµÀ£¬Ê¹Óÿͻ§¶ËµÄ½Å±¾½«´ó´óÌá¸ßÒ³ÃæµÄÏìÓ¦Ëٶȣ¬Í¬Ê±¿ÉÒÔ±ÜÃâƵ·±µØË¢ÐÂÒ³Ãæ¡£ËùÒÔʹÓÃjavascriptÀ´ÊµÏÖÒ³ÃæÖв¿·Ö¿ØÖÆÊÇÒ»¸ö±È½ÏºÃµÄ·½Ê½£¬µ


Ïà¹ØÎĵµ£º

ASP.NET³ÌÐòÖÐ Å׳ö"Thread was being aborted. "Òì³£

½ñÌìͻȻÓöµ½Õâ¸öÎÊÌâÁË£¡²»¹ýË¢ÐÂÒ³Ãæºó´íÎó¾ÍûÓУ¡ ¶øÇÒ֮ǰҲûÓÐÕâ¸ö´íÎóŶ£¡ ... ²»¹ýÎÒ»¹ÊÇÈ¥GoogleÁËһϴ𰸣¡
Thread was being aborted :ÖÐÎÄÒâ˼ Ï̱߳»ÖÕÖ¹
ÒýÓõØÖ·£ºhttp://support.microsoft.com/default.aspx/kb/312629/EN-US/?p=1
Ô­Òò£º
ÄǸö Response.End ·½·¨½áÊøÒ³µÄÖ´ÐУ¬²¢×ªÒƵ½Ö´ÐÐ µÄApplic ......

40ÌõASP.NET¿ª·¢×¼Ôò

1¡¢ÔÚcompilation Ï£¬ÇëÉèÖÃdebug=false £¬ÈçÏ£º
default Language="c#" debug="false">
2¡¢ÇëʹÓÃServer.Transfer´úÌæResponse.Redirect¡£
3¡¢Ê¹ÓÃValidator¿Ø¼þ£¬ÇëÒª¾­³£¼ì²éPage.IsValid¡£
4¡¢ÇëʹÓÃforeachÑ­»·£¬¶ø²»ÊÇΪ×Ö·û´®µü´úÑ­»·¡£
5¡¢ÇëʹÓÿͻ§¶ËÑéÖ¤·½Ê½(²»ÒªÃ¿´Î¶¼ÔÚ·þÎñ¶ËÑéÖ¤)¡£
6¡¢ÎªÁ˱ÜÃâÖ ......

ASP.NETÒ³ÃæÓëIISµ×²ã½»»¥ºÍ¹¤×÷Ô­ÀíÏê½â

ASP.NETÒ³ÃæÓëIISµ×²ã½»»¥ºÍ¹¤×÷Ô­ÀíÏê½â 
µÚÒ»»Ø£º
ÒýÑÔ
ÎÒ²éÔĹý²»ÉÙAsp.NetµÄÊé¼®£¬·¢ÏÖ´ó¶àÊý×÷Õ߶¼ÊÇÕ¾ÔÚÒ»¸ö±È½Ï¸ßµÄ²ã´ÎÉϽ²½âAsp.Net¡£ËûÃÇÄÍÐÄ¡¢Ï¸ÖµظæËßÄãÈçºÎÒ»²½²½ÍϷſؼþ¡¢ÉèÖÿؼþÊôÐÔ¡¢±àдCodeBehind´úÂ룬ÒÔʵÏÖij¸öÌض¨µÄ¹¦ÄÜ¡£
ÕâÖÖ×ö·¨£¬Êµ¼ÊÉÏÊǻشðÁË“ÈçºÎÈ¥×ö”µÄÎÊÌ⣬ȴà ......

asp.net responseдÎļþ

   protected void Button2_Click(object sender, EventArgs e)
    {      
      bool ok = true;
       string fileName;
        fileName = DateTime.Now. ......

26¸öASP.NET³£ÓÃÐÔÄÜÓÅ»¯·½·¨


Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯
¡¡¡¡Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
¡¡¡¡·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄܵÄÓ°Ï졣ϵͳ½«Óû§µÄÊý¾Ý¿âÁ¬½Ó·ÅÔÚÁ¬½Ó³ØÖУ¬ÐèҪʱȡ³ö£¬¹Ø±ÕÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ