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

asp.net´íÎó´¦Àí

 ³öÏÖ´íÎó·¢ËÍEmail
¿ÉÒÔÔÚGlobal.asaxµÄvoid Application_Error(Object sender,EventArgs e)
{
 //Óõ½ÁËSsytem.Net.Mail
 MailMessage mail=new MailMessage();
 mail.from=new MailAddress("automated@contoso.com");
 mail.Subject="SIte Error at" +DateTime.Now;
 mail.Body="Error Decription"+ ex.Message;
 SmtpClient server=new SmtpClient();
 server.Host=outgoingMailServerHost;
 server.Send(mail);
}
///½¨×³µÄ´íÎó´¦Àí
1¡£Ô¤²âÎÊÌ⣬¾ßÌå×ö·¹ÊÇ°ÑËùÓпÉÄÜ·¢Éú¹ÊÕÏ´úÂë·â×°ÔÚtry/catch/finnally¿éÖУ¬µ¥Æ¾ÕâÒ»µã²¢²»Äܱ£Ö¤²»»á³öÏÖÒì³££¬ÖÁÉÙ»¹ÒªÕýÈ·µÄ´¦Àí³£¼ûµÄÒì³£
2¡£²»ÒªÁôÏÂÈκÎδ´¦ÀíµÄÒì³££¬Ö»Òª×ñÑ­Õâ¸öÖ¸µ¼Ô­Ôò£¬¼´Ê¹Î´ÄÜÔ¤²âµ½Ä³ÖÖÎÊÌ⣬ҲÖÁÉÙ²»»áÈÃÓû§¿´µ½Òì³£Ò³Ã棬ÎÒÃÇ¿ÉÒÔÔÚÒ³Ã漶ºÍÓ¦ÓóÌÐò¼¶ÊµÊ©ÕâÒ»Ö¸µ¼Ô­Ôò£¬²»ÓÃ˵£¬Ó¦ÓóÌÐò¼¶±ð´íÎó´¦Àí³ÌÐòÓÅÏÈÓÚÒ³Ã漶´¦Àí³ÌÐò
3¡£È·±£´íÎóÒ³Ãæ²»»áй©ÈκÎÃô¸Ð×ÊÁÏ£¬ÈçÓбØÒª£¬Çø·Ö±¾µØÓû§ºÍÔ¶³ÌÓû§£¬²¢Ö»¶Ô±¾µØÓû§ÏÔʾÏûÏ¢£¬±¾µØÓû§±»¶¨Òåδ´ÓWeb·þÎñÆ÷»úÆ÷·ÃÎÊÓ¦ÓóÌÐòµÄÓû§
web.config ÖеÄ<customErrors>½Ú
<customErrors mode="RemoteOnly"> mode Off/RemoteOnly/On
¸üרҵµãµÄ Ò»°ãÓÃmode£½"RemoteOnly"Ïò±¾µØÓû§ÏÔʾÏêϸ´íÎó£¬ÏòÔ¶³ÌÓû§ÏÔʾ´íÎóÒ³Ãæ
<customErrors mode="On" defaultRedirect="/Error.aspx">
  <error statusCode="404" redirect="Errro404.aspx"/>
</customErrors>


Ïà¹ØÎĵµ£º

ASP.NET¹ØÓÚÌõÐÎÂëµÄÉú³ÉÎÊÌâ¼æÍøÒ³´òÓ¡

ÌõÐÎÂëÊÇÆù½ñΪֹ×î¾­¼Ã¡¢ÊµÓõÄÒ»ÖÖ×Ô¶¯Ê¶±ð¼¼Êõ¡£ÌõÐÎÂë¼¼Êõ¾ßÓÐÒÔϼ¸¸ö·½ÃæµÄÓŵã
¡¡¡¡A£®ÊäÈëËٶȿ죺Óë¼üÅÌÊäÈëÏà±È£¬ÌõÐÎÂëÊäÈëµÄËÙ¶ÈÊǼüÅÌÊäÈëµÄ5±¶£¬²¢ÇÒÄÜʵÏÖ“¼´Ê±Êý¾ÝÊäÈ딡£
¡¡¡¡B£®¿É¿¿ÐԸߣº¼üÅÌÊäÈëÊý¾Ý³ö´íÂÊΪÈý°Ù·ÖÖ®Ò»£¬ÀûÓùâѧ×Ö·ûʶ±ð¼¼Êõ³ö´íÂÊΪÍò·ÖÖ®Ò»£¬¶ø²ÉÓÃÌõÐÎÂë¼¼ÊõÎóÂëÂʵ ......

ASP.NETÒ³Ãæ¶ÔÏó – Response

    »ñÈ¡Óë¸Ã Page ¶ÔÏó¹ØÁªµÄ HttpResponse ¶ÔÏ󡣸öÔÏóʹÄúµÃÒÔ½« HTTP ÏìÓ¦Êý¾Ý·¢Ë͵½¿Í»§¶Ë£¬²¢°üº¬ÓйظÃÏìÓ¦µÄÐÅÏ¢¡£
Ò»¡¢HttpResponse Àà
·â×°À´×Ô ASP.NET ²Ù×÷µÄ HTTP ÏìÓ¦ÐÅÏ¢¡£
HttpResponse ÀàÐ͹«¿ªÒÔϳÉÔ±¡£
 ¹¹Ô캯Êý
Ãû³Æ
˵Ã÷
HttpResponse
»ù´¡½á¹¹¡£³õʼ»¯ HttpRespons ......

¿ª·¢asp.net×Ô¶¨Òå¿Ø¼þ

 Ñ§Ï°×Ô¶¨Òå¿Ø¼þµÄ¿ª·¢²»½ö¿ÉÒÔʹÄ㿪·¢³ö¸üÁé»îµÄϵͳ¸üÖØÒªµÄÊÇËü¿ÉÒÔʹÄã¼ÓÉî¶ÔÒÑÓзþÎñÆ÷¿Ø¼þµÄÀí½â£¬µÃÒÔ¸üÁé»îµÄÓ¦Óá£
½ÏÖ®ÓÚasp£¬asp.netÌṩÁ˸üÇ¿´óµÄ¹¦ÄÜ£¬ÎұȽÏϲ»¶ËüµÄ´úÂë·ÖÀë¼¼ÊõºÍ¶ÔÖîÈçC#¡¢VB.NetµÈÇ¿ÀàÐÍÓïÑÔµÄʹÓã¬ÕâÊÇ´Ó¿ª·¢ÕߵĽǶÈÀ´¿´µÄ£¬´ÓÓû§µÄ½Ç¶ÈÀ´¿´£¬»á¾õµÃËüËٶȸü¿ì£¬ÔËÐиüÎȶ¨£¬ ......

asp.net Ò³ÃæÓÒϽǵ¯³öÀàËÆQQ»òMSNµÄÏûÏ¢Ìáʾ

<HTML><HEAD>
<TITLE>ÍøÒ³ÌØЧ¹ÛÖ¹|JsCode.CN|---Ò³ÃæÓÒϽǵ¯³öÀàËÆQQ»òMSNµÄÏûÏ¢Ìáʾ</TITLE>
<SCRIPT language=JavaScript>
<!--
/**//*
**    ==================================================================================================
**&nbs ......

asp.net¿çҳͶµÝ

 1.TextBox txt=(TextBox)PreviousPage.FindControl("TextBox1");
2.ÔÚÒ³Ãæ×¢²áͶµÝÒ³µÄÊôÐÔ
 <%@ PreviousPageType VirtualPath="crouspostPage.aspx" %>
ÔÚcrouspostPage.aspxµÄ´úÂëÒþ²ØÀàÖÐÌí¼Ó
public TextBox TextBox1
{
 get(return _textbox);
}
ÔÚÒ³ÃæÖÐResponse.Write(PreviousPage. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ