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

ASP.NETÒ³ÃæÖض¨Ïò·½·¨Ð¡½á

Òý×Ô: http://renhappy20066.blog.163.com/blog/static/112080786200961172521923/
ASP.NETÒ³ÃæÖض¨Ïò·½·¨Ð¡½á
asp.net   2009-07-11 07:25   ÔĶÁ54   ÆÀÂÛ0  
×ֺţº ´ó´ó  ÖÐÖР СС
Ò³ÃæÖض¨ÏòµÄʹÓúܶ࣬ʵÏÖ·½·¨Ò²Óв»Í¬£¬×Ô¼ºÒ²ÊÔ¹ý¼¸ÖÖ£¬ÏÖÔÚ×ܽáһϡ£
    Ò»¡¢Transfer Execute RedirectÖض¨Ïò·½·¨½éÉÜ
     1.Server.Transfer·½·¨:
     Server.Transfer("m2.aspx");//Ò³ÃæתÏò(·þÎñÆ÷ÉÏÖ´ÐÐ)¡£·þÎñÆ÷Í£Ö¹½âÎö±¾Ò³,±£´æ´ËҳתÏòÇ°µÄÊý¾Ýºó,ÔÙʹҳÃæתÏòµ½m2.aspx, ²¢½«×ªÏòÇ°Êý¾Ý¼ÓÉÏm2.aspxÒ³½á¹û·µ»Ø¸øä¯ÀÀÆ÷¡£
     2.Server.Execute·½·¨:
     Server.Execute("m2.aspx"); ·þÎñÆ÷±£´æ´ËҳתÏòÇ°µÄÊý¾Ýºó,ʹҳÃæתÏòµ½m2.aspxÖ´ÐÐ, ÔÙ·µ»Ø±¾Ò³¼ÌÐøÖ´ÐÐ.ÔÙ½«ÈýÕß½á¹ûºÏ²¢ºó·µ»Ø¸øä¯ÀÀÆ÷.
     ÒÔÉ϶¼ÊÇ·þÎñÆ÷¶ËÒ³ÃæתÏòËùÒÔä¯ÀÀÆ÷²»³öÏÖÒ³¸ü¸Ä¼Ç¼(ÏÔʾµÄµØÖ·²»»á¸Ä±ä)¡£Òò´Ë,Èç¹ûÓû§Ë¢Ð´ËÒ³,Ò²Ðí»á³öÏÖһЩÆäËüÒâÍâÇé¿ö. ´ËÀàҳתÏò,¿ÉÍê³ÉһЩÆäËü¹¦ÄÜ,±ÈÈç·ÃÎʵ½Ç°Ò»Ò³ÃæÖеķþÎñ¶Ë¿Ø¼þ¡£
     3.Response.Redirect:
     µ±ä¯ÀÀÆ÷ÇëÇóaspxÒ³Ãæʱ,Åöµ½Redirect(url)·½·¨, Ï൱ÓÚ¸æËßä¯ÀÀÆ÷,ÄãÏÈÐè·ÃÎÊijҳÃæ,ÓÚÊÇä¯ÀÀÆ÷ÔÙÏò·þÎñÆ÷·¢ËÍÒ»¸öµ½´ËÒ³ÃæµÄÇëÇó¡£Öض¨Î»ÊÇͨ¹ýä¯ÀÀÆ÷Ö´ÐеÄ,ÔÚ·þÎñÆ÷ºÍä¯ÀÀÆ÷Ö®¼ä»á²úÉú¶îÍâµÄÍù·µ¹ý³Ì¡£ÔÚÍøÂç×´¿ö²»ÊǺܺõÄÇé¿öÏÂ,Á½´ÎÇëÇó»á´ó´óµÄ½µµÍÓ¦ÓóÌÐòµÄ·´Ó¦ËÙ¶È,ÉõÖÁÕ¼ÓöàÓàµÄ´ø¿í¡£
     ×ܽá, ÔÚÍøÂç״̬½ÏºÃµÄÇé¿öÏÂ,Redirect(url)·½·¨Ð§ÂÊ×î¸ß!! Server.Transfer·½·¨ºÍServer.Execute·½·¨×îÁé»î!! Server.Execute·½·¨Õ¼ÓÃ×ÊÔ´×î¶à¡£
    ¶þ¡¢ÌøתҳÃæasp.netÌṩµÄÈýÖÖ·½·¨±È½Ï
     1 response.redirect Õâ¸öÌøתҳÃæµÄ·½·¨ÌøתµÄËٶȲ»¿ì£¬ÒòΪËüÒª×ß2¸öÀ´»Ø£¨2´Îpostback£©£¬µ«Ëû¿ÉÒÔÌø תµ½ÈκÎÒ³Ã棬ûÓÐÕ¾µãÒ³ÃæÏÞÖÆ£¨¼´¿ÉÒÔÓÉÑÅ»¢Ìøµ½ÐÂÀË£©£¬Í¬Ê±²»ÄÜÌø¹ýµÇ¼±£»¤¡£µ«ËÙ¶ÈÂýÊÇÆä×î´óȱÏÝ£¡redirectÌøת»úÖÆ£ºÊ×ÏÈÊÇ·¢ËÍÒ»¸öhttpÇëÇ󵽿ͻ§¶Ë£¬Í¨ÖªÐèÒªÌøתµ½ÐÂÒ³Ã棬Ȼºó¿Í»§¶ËÔÚ·¢ËÍÌøתÇëÇóµ½·þÎñÆ÷¶Ë¡£ÐèҪעÒâµÄÊÇÌøתºóÄÚ²¿¿Õ¼ä±£´æµÄËùÓÐÊý¾ÝÐÅÏ¢½«»á¶ªÊ§£¬Ë


Ïà¹ØÎĵµ£º

Asp.net treeviewʵÏÖÎÞÏÞ¼¶Ê÷

×î½üÑо¿ÁËÒ»ÏÂtreeview£¬·¢ÏÖÓÐÁ½ÖÖʵÏÖÎÞÏÞ¼¶Ê÷µÄ·½·¨£¬ÎÄ×Ö²»Ïë¶àд£¬Ö±ÈëÖ÷Ìâ¡£
ÏÈ¿´¿´Êý¾Ý¿â±íµÄÉè¼Æ£¬Êý¾Ý±íÖ÷Òª°üÀ¨ID£¬Name£¬ParentIDÕâÈýÏÆäÖÐIDÊÇÖ÷¼ü£¬ParentID¶ÔÓ¦½ÚµãµÄ¸¸½Úµã£º
·½·¨Ò»£ºÓõݹé±éÀúÊý¾Ý£¬²¢½«½ÚµãÖð¸öÌí¼Óµ½treeviewÖÐÈ¥¡£
1.ÏȽøÐÐÊý¾Ý¿âÁ¬½ÓºÍÊý¾ÝµÄ¶ÁÈ¡£¬²¢½«¸ù½ÚµãÏÈÌí¼Ó½øtreeview ......

asp.netÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄܵķ½·¨

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

asp.netÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄܵķ½·¨


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

asp.net template item Àï id ÔÚpostbackºó ²»Ò»ÖÂ

֮ǰÓöµ½Ò»¸öºÜÓôÃƵÄÎÊÌ⣬ ´ó¸Å¾ÍÊÇdagagridÀïÓ¦ÓÃÁËÒ»¸öÐÐÊÇcheckbox£¬ ½á¹ûËÀ»îµãcheck all£¬ submitÒÔºó Response.FormÀïµÄidºÍ FindControlÀïÕÒµ½µÄ²»Ò»ÖÂÁË.
½áÂÛÊÇ:
datagrid °ó¶¨ÒÔºóÔÙÒ²²»Òª¶¯ÁË! ·ñÔò ǰ̨id ÔÙpostback µÄʱºòÊDz»Ò»Ö嵀 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ