Erda Yıldırım
80+ Gold
- Katılım
- 22 Kasım 2020
- Mesajlar
- 5,765
- Reaksiyon skoru
- 4,379
her butona bastığımda değişken değeri 1 artıcak
bunu nasıl yapabilirim ?
bunu nasıl yapabilirim ?
private int i
{
get
{
if (Session["i"] == null)
return 0;
return (int)Session["i"];
// Instead of 3 lines in the above, you can use this one too as a short form.
// return (int?) Session["i"] ?? 0;
}
set
{
Session["i"] = value;
}
}
protected void btnStart_Click(object sender, EventArgs e)
{
i++;
lblStart.Text = i.ToString();
}