I am trying to work with asp.net. I have very small question. In one of my button click event, I have heavy task that need to be executed and it causing problem. How can i run
In general your question is a little to broad. Not sure if you mean the background worker class which is aviable in WinForms (your tag indicates you mean asp.net 5). Do you really want to use exact this class ?
But i would recommend you to use tasks. See MSDN Task Parallel Library
There you can create and await tasks.
var result = await Task.Run(() => myBackgroundWork());
Furthermore if your background code supports async (e.g. network traffic) you could simplay await it and make your code asynchron without using threads.
See for example Doing Work without threads . Threads always come at a cost and you may not want to pay this.