ASP.net is a server side language, and for each event it jumps to server to perform the task which is known as postback. Now, there may be many tasks like as page validation or adding,opening, closing of controls, divs etc for which server side scripting may be a very costly approach. To perform such small tasks for which no database interaction or server interaction is required, we normally use javascript.
For more information,
1.
See This[
^], or
2.
See This[
^]