By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

asp to Javascript

P: 1
Hi
Im seeking a way to converting an asp variable to Javascript variable.
I cant find how so I hope someon can help me.
Thanks,
Jun 21 '06 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
As with any conversion from server-side to client-side, use the server-side language to generate the JavaScript code, or even just print out the server-side variable, e.g.
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. var jsVar = "<% 'asp code here to print the ASP variable %>";
  3. </script>
Apr 26 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.