Aspx’de Formdaki Verileri Ekrana Yazdırma
Default.aspx.cs kodları
protectedvoid DropDownList1_SelectedIndexChanged(objectsender, EventArgs e)
{
int yas, dtarih;
dtarih = Convert.ToInt16(DropDownList1.SelectedItem.ToString());
yas = 2016 – dtarih;
TextBox2.Text = yas.ToString();
}
protectedvoid Button1_Click(objectsender, EventArgs e)
{
ListBox1.Items.Add(“Adınız Soyadınız = “+TextBox1.Text);
ListBox1.Items.Add(“Doğum Yılı = ” + DropDownList1.SelectedItem.Text);
ListBox1.Items.Add(“Yaş = ” + TextBox2.Text);
ListBox1.Items.Add(“Cinsiyeti = ” + DropDownList2.SelectedItem.Text);
ListBox1.Items.Add(“Medeni Hali = ” + DropDownList3.SelectedItem.Text);
}