Hi,
in this case you need to define a global variable to store the value on each time button clicked. try like this:
private int Value = 0;
protected void Page_Load(object sender, EventArgs e)
{
Panel_visfrugt.Visible = true;
}
protected void Button1_Click1(object sender, EventArgs e)
{
foreach (RepeaterItem item in Repeater1.Items)
{
if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
{
TextBox Textbox_antal = item.FindControl("txtbox1") as TextBox;
Value = Convert.ToInt32(Value + int.Parse(Textbox_antal.Text));
if (Value != 7)
{
Label1.Text = "Nu er der 7";
}
else
{
Label1.Text = "Der er over 8 nu";
}
}
}
}