First, yes you can use asp.net and javascript in the same application.
Net does the server-side stuff while javascript handles whatever can be done on the client-side.
As to passing variables between the two, yes and no....
Asp.net and javascript don't share session variables, but you can get a value from one to the other by putting it in
a hidden field on your form. Net can access on the host side via a postback while javascript can access it on the client side.
I don't have a sample handy, but I'll look around and post on when I find it.
Good luck
TT