asp.netÒ³ÃæµÄ¼ÓÔØ˳Ðò
Ò³Ãæ¼ÓÔØ˳ÐòÈçÏÂ:
Page.Init
Page.Load
Textbox.TextChanged
Button.Click
Page.PreRender
Page.Unload
ÔÚPage.Unload֮ǰ,Ò³Ãæ¾Í³ÊÏÖ³öÀ´ÁË.
page.initÖ»ÊÇÔÚÒ³ÃæµÚÒ»´ÎÔØÈëµÄʱºòÖ´ÐÐ,µ±Ò³Ãæpostbackºó´Ópage.load¿ªÊ¼Ö´ÐÐ.
e.g
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication8._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="lbl" runat="server"></asp:Label>
<br />
<asp:Button ID="btn" runat="server" onclick="btn_Click" />
</div>
</form>
</body>
</html>
C#´úÂë:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication8
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
lbl.Text += "pageload is on.<br />";
else
lbl.Text += "This is not your first.<br />";
}
protected void Page_Init(object sender, EventArgs e)
{
lbl.Text += "pageinit is on.<br />";
}
protected void Page_PreRender(object sender, EventArgs e)
{
lbl.Text += "pageprerender is on.<br />";
}
protected void btn_Click(object sender, EventArgs e)
{
lbl.Text += "button i
Ïà¹ØÎĵµ£º
̸̸ASP.NETÖеēµØÖ·¾ö¶¨ÄÚÈÝ”ÎÊÌâ
ʲôÊǵØÖ·¾ö¶¨ÄÚÈÝ£¿
ÄãÔÚÍøÉϹ䣬¿´µ½Ò»¸öÓÐȤµÄÒ³Ã棬ÓÚÊÇÄã°ÑµØÖ·À¸ÀïµÄÄÚÈݸ´ÖÆÏÂÀ´£¬·¢¸øÕýÔÚ¸úÄãÁÄÌìµÄÍøÓÑ£º“¿´¿´Õâ¸öÒ³Ã棬ÓÐȤ¼«ÁË”£¬ÄãµÄÅóÓÑ´ò¿ªÄã·¢µÄÁ´½Ó£¬¿´µ½µÄÄÚÈÝÓ¦¸ÃºÍÄãÕýÔÚ¿´µÄÒ»Ñù¡£Ò²¼´£¬Ò³ÃæµÄÖ÷ÒªÄÚÈÝÓ¦µ±È¡¾öÓÚµØÖ·À¸ÖеĵØÖ·¡£µ«Ô ......
ÔÚ2003ϵͳÏÂ,°´ÕÕÔÚIIS6ÖÐÍøÕ¾ÓÒ¼üÊôÐÔ£Ö÷Ŀ¼£ÅäÖãÔÚͨÅä·ûÓ¦ÓóÌÐòÓ³É䣲åÈëÉèÖÃÌí¼ÓͳÅä·û,¿ÉÖ´ÐÐÎļþÑ¡ÔñC:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll¡¡×¢Òâ“È·ÈÏÎļþÊÇ·ñ´æÔÚ”Õâ¸öÑ¡ÏҪѡÉÏ
2 Õ¾µãÖÐÒýÈëUrlRewrting.dll
3 Web.configÅäÖÃÐÞ¸ÄÈçÏ£º
<RewriterConfig& ......
»Ã棺
<asp:HiddenField ID="hfdXuHao" runat="server" />
<asp:TreeView ID="tvMenu" runat="server" CssClass="tvStyle" EnableClientScript="false"
& ......
ϵͳÀà
¡¡¡¡TypeÀ࣬ObjectÀ࣬StringÀ࣬ ArrayÀ࣬ConsoleÀ࣬ ExceptionÀ࣬GCÀ࣬ MarshalByRefObjectÀ࣬ MathÀà¡£
¡¡¡¡DateTime½á¹¹£¬Guid ½á¹¹£¬
¡¡¡¡ICloneable½Ó¿Ú£¬IComparable½Ó¿Ú£¬IConvertible½Ó¿Ú£¬ IDisposableÀ࣬
¡¡¡¡¼¯ºÏÀà
¡¡¡¡ICollection½Ó¿Ú£¬IComparer½Ó¿Ú£¬IDictionary½Ó¿Ú¡£IDictionaryEnume ......
//ʵÀý»¯Ò»¸öSmtpClientsmtp.DeliveryMethod = SmtpDeliveryMethod.Network;
SmtpClient smtp = new SmtpClient();
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
//½«smtpµÄ³öÕ¾·½Ê½ÉèΪ Networksmtp.EnableSsl = false;
//smtp·þÎñÆ÷ÊÇ·ñÆôÓÃSSL¼ÓÃÜ
smtp ......