event is executed on the server when the page is loading first time and then on each page post back. At the end of all page events execution the page is send it back in HTML format to the web browser and then the web browser interpret and display the page to the client.
2.On the other side the
code is designed to be executed directly on the browser;
event by using
like in the next example:
StringBuilder script = new StringBuilder();
ClientScript.RegisterClientScriptBlock(this.GetType(), "Pop", script.ToString());