If you are developing windows application then you have rich functionality in all controls like mousehover, mouseclick etc... As asp.net code executes on server, this kind of functionality( client click, onmousehover) cannot be provided... therefore client side scripting is used....Imagine have to postback to server on "mousehover", the user will have to wait for ever for any functionality... To achieve this, "something" that runs on client side is used... Javascript is that "something" ..
As for windows application the code executes on the client side therefore rich features like "mousehover" are executed on client... There is no use of JavaScript...
Sample windows application on button MouseHover event ...
-
private void button1_MouseHover(object sender, EventArgs e)
-
{
-
MessageBox.Show("Mouse over me "+((sender)as Button).Text);
-
}
-