hi everyone..you are my last hope :D
I have a problem...I'd like to try to do this thing (i'll write it in a pseudo-code)
(every 5 seconds){ do something}
well as concerne the "do something" part I have already wrote the code. the big problem is how to use timer! I tryed this thing
try{
.....
Timer timer = new Timer();
timer.Interval = 5000;
timer.Enabled=true;
timer.Start();
timer.Elapsed += delegate
{
String p = prestazioni[j].ToString();
Label2.Text = p;
if (j == (righe - 1))
j = 2;
gvdati.DataSource = elaboraQuery02(prestazioni, j);
gvdati.DataBind();
gvdati01.DataSource = elaboraQuery01(prestazioni, j);
gvdati01.DataBind();
gvdati02.DataSource = elaboraQuery(prestazioni, j);
gvdati02.DataBind();
j++;
};
}
catch...
finally... the problem is that after "timer.Start();" the code skip the delegate(I checked it with debug) and I don't know why...anyone can help me?
If you think is better to change the code and/or you have any hints you are more than welcome... help please :)
bye bye
daniele