关于重载oninit方法
using System;using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("页加载");
Response.Write(textbox1.Text);
}
protected override void OnInit(EventArgs e)
{
Response.Write(textbox1.Text);
}
protected void click(object sender, EventArgs e)
{
}
}
请问一下。为何oninit只会第一次请求时会执行,当回传服务器后,oninit就不会再执行啦呢?还是。这里的oninit是方法还是事件呢?