How to pass a binddata variable from html to javascrip

liunx

Guest
Hi,
I am using asp.net with a variable named emailstr, used the variable like onmouseover="singy(<%#emailstr%> )" in html which singy is a function in Javascript <script language="javascript">
<!--
function singy(c)
{
document.write(c);
}
The problem is: it does not do anything, anybody can help, please; thanks.
HosseinTry Response.write(emailstr). I think that will workThanks, JoeyD
but I want to use the variable (emailstr) in Javascript function
Happy new yearI don't have my code in front of me but I think this is how I would write the html for it.

onmouseover="<%# Response.write("singy(" & emailstr & ")") %>"the error message the server tags cannot contain <%...%> constructs shows upsorry, the server tag is not well formated shows up
 
Back
Top