Web Sayfası Lyfe Cycle Örneği için tıklayınız.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication12
{
public partial class WebForm4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Log(“<< Sayfa Yüklendi... >>”);
}
protected void Page_PreRender(object sender, EventArgs e)
{
Log(“<< Pre Render işlemi... >>”);
}
private void Log(string giris)
{
ListBox1.Items.Add(giris);
ListBox1.SelectedIndex = ListBox1.Items.Count – 1;
}
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
string ctrlName = ((Control)sender).ID;
Log(ctrlName + ” Changed”);
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
string ctrlName = ((Control)sender).ID;
Log(ctrlName + ” Changed”);
}
protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
{
string ctrlName = ((Control)sender).ID;
Log(ctrlName + ” Changed”);
}
protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
{
}
}
}