here is my thread in asp.net web page (code behind) :
Thread my_thread = new Thread(delegate()
{
my_thread_method(params);
});
Timer1.Enabled = true;
my_thread.Start();
Now I want to access Timer1 in my_thread() and work with that timer.
How can i do that?
I also need to update some labels text inside thread, but I don't have access to them.
What is the solution?
my_thread_method needs to be defined in the same class as the controls in order for you to access them.
You will then need to read this sort of thing to call UI classes correctly from the non-UI thread:
How to update the GUI from another thread in C#?
EDIT
this answer is not related to asp.net web forms.
so we can not accept this.