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

ASP.NET Òì³£´¦Àí

ASP.NET Òì³£´¦Àí
ÔÚ
Asp.net
¿ª·¢¹ý³ÌÖУ¬ÎÒÃÇ»áÓöµ½ºÜ¶à
Exception
£¬²»´¦ÀíÕâЩ
Exception
µÄ»°»á³öÏÖºÜÄÑ¿´µÄÒ³Ãæ¡£
»¹ÓÐһЩÎÒÃÇδԤÁϵ½µÄ
Exception
£¬µ±·¢Éú
Exception
ʱ£¬ÎÒÃÇÒ²±ØÐë½øÐмǼ¾ßÌåλÖã¬ÒÔ±ãÎÒÃÇÐÞÕý´íÎó¡£
asp.net
Òì³£´¦ÀíµÄλÖôó¸ÅÓÐÒÔÏÂ
3
¸öµØ·½
1.
³ÌÐòµÄ´úÂë¶ÎÖУ¬ÕâÊÇ×îÖ±½Ó´¦ÀíÒì³£µÄµØ·½¡£ÈçÏÂ
try
{
    n=Convert.ToInt32(info);
}
catch(Exception)
{
}
Ö»ÊÇ×î»ù±¾´¦ÀíÒì³£µÄµØ·½¡£
2. ASP.NET
µÄÖеÄ
Application_Error
ÖÐ
.Application_Error
ʼþ¡£¶ÔÓÚÓ¦ÓóÌÐòÖÐÒý·¢µÄÈκÎδ´¦ÀíÒì³£¶¼»áÒý·¢´Ëʼþ¡£Ò»°ãÎÒÃÇ´¦ÀíÈçÏÂ
protected void Application_Error(Object sender, EventArgs e)
  {
    Exception exp=Server.GetLastError();
    string strE="
ÄÚ²¿´íÎó
:"+ exp.InnerException.ToString()+"\r\n
¶ÑÕ»£º
"+ exp.StackTrace+"\r "+"Message:"+exp.Message+"\r
À´Ô´
:"+exp.Source;
   
   // ÔÚʼþÈÕÖ¾ÖмǼÒì³£ÐÅÏ¢
   Log(strE);
   Server.ClearError();
   Server.Transfer("Error.aspx",false);
  }
ÕâÑùÎÒÃǾͿÉÒÔ´¦Àí
Server
¶Ë³öÏֵĴíÎó¡£ÎÒÃǼǼ³ö´íµÄÔ´Í·¡£
3.
Ò²¿ÉÒÔÔÚÒ³¼¶±ð»òÕßÓ¦ÓóÌÐò¼¶±ð´¦Àí´úÂë´íÎó¡£
Page
»ùÀ๫¿ªÁËÒ»¸ö
Page_Error
·½·¨£¬´Ë·½·¨ÔÚÒ³ÖпÉÒÔ±»ÖØд¡£Ã¿µ±ÔËÐÐʱÒý·¢Î´²¶»ñµÄÒ쳣ʱ¶¼µ÷Óô˷½·¨¡£
void Page_Error(Object source, EventArgs e) {
    String message = "<font face=verdana color=red>"
        + "<h4>" + Request.Url.ToString() + "</h4>"
        + "<pre><font color='red'>"
        + Server.GetLastError().ToString() + "</pre>"
        + "</font>";
    Response.Write(message);
}
 
ÏÂÃæÎÒ½²ÊöÒ»ÏÂÔõôÔÚ
ASP.NET
³ÌÐòÀïÃæͳһµÄ´¦ÀíÒì


Ïà¹ØÎĵµ£º

ASP.NET ·þÎñÆ÷¿Ø¼þäÖȾµ½¿Í»§¶ËÖ®ºó¶ÔÓ¦µÄHTML±êÇ©

·þÎñÆ÷¿Ø¼þ        html±ê¼Ç
label----------<span/>
button---------<input type="submit"/>
textbox--------<input type="text"/>
linkbutton-----<a href="javascript:" />
imagebutton----<input type="image"/>
hyperlink------<a />
......

asp.netÖÐÈçºÎʹÓÃ΢ÈíµÄURLRewriter½øÐÐurlÖØд

asp.netÖÐÈçºÎ½øÐÐurlÖØд£¬½ñÌìÑо¿ÁËÒ»ÌìÕâ¸öÎÊÌâ
ÏëʵÏÖÖîÈ磺http://www.51cto.com/2008/2/2
http://www.51cto.com/default.html
µÈÕâÖÖurl
µ±È»£¬³ÌÐòÖ±½ÓÉú³É¾²Ì¬Ò³Ãæ¿ÉÒÔʵÏÖµÄ
µ«ÊÇÄÇÑùÒªÉú³ÉºÜ¶àÕâÖÖÒ³ÃæÒÔ¼°Îļþ¼Ð
¶øÇÒÔÚÊý¾ÝÁ¿´óµÄÇé¿öÏÂÉú³ÉÊǺÜÀË·Ñʱ¼äµÄ
ÔÚÕâÖÖÇé¿öϾÍҪʵÏÖurlÖØдÁË£¬µ±È»¾ ......

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

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

asp.net Excel¿ØÖÆ(·þÎñÆ÷¶Ë£©

  ×î½üÕýÔÚ×öÒ»¸ö±¨±í³ÌÐò£¬Ò²¾ÍÊÇÀûÓÃÒѾ­Óеı¨±íÄ£°å£¬½«Êý¾Ý¿âÀïµÄÊý¾ÝÌî³ä½øÈ¥ºó£¬¿Í»§¶Ë¿ÉÒÔÏÂÔØ¡£
  »ù±¾Ë¼ÏëÊÇÕâÑùµÄ£º1.ÔÚ·þÎñÆ÷¶Ë±¾µØн¨Ò»¸öÎļþ¼Ð£¬×¨ÃÅÓÃÀ´´æ·ÅÁÙʱµÄExcel±í¸ñ
                  & ......

asp.net¶ÔÓÚ³¤ÆªÎÄÕ½øÐзÖÒ³

¶ÔÓÚÎÄÕÂƪ·ù±È½Ï³¤µÄ£¬¾Í±ØÐë²ÉÓ÷ÖÒ³ÏÔʾ¡£ÔÚ.netÖжԳ¤ÆªÎÄÕ·ÖÒ³Ò»°ãÓÐ2ÖÖ·½·¨£¬µÚÒ»ÖÖ¾ÍÊÇÏȼÆËãºÃÒ»Ò³µÄÎÄ×Ö³¤¶ÈÊǶàÉÙ£¬È»ºó°ÑÎÄÕÂ×ܵij¤¶È³ýÉèÖúõĵ¥Ò³ÎÄ×Ö³¤¶È¼°¿É£¬ÓÃÕâ·½·¨¿ÉÒÔ¼õÉÙÈÏΪ½øÐзÖÒ³µÄ·±Ëö£¬µ«ÊÇÕâÑù·ÖÒ³³öÀ´µÄ¿ÉÄܲ»ÊǺÜÕýÈ·£¬ÒòΪ²»ÄÜ´ïµ½ÏëÔÚijЩÌصãλÖýøÐзÖÒ³¡£µÚ¶þÖÖ¾ÍÊÇͨ¹ýÈËΪºÍ³ÌÐòÊµÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ