Is it possible to use asp.net and javascript together?
Can I process some number, assign it to a variable and then
pass that variable to a javascript? If so, could you please provide some examples on how to do this? Thankx in advance.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.