Hi,
I have this C#/ASP.NET/.aspx page with a string variable named myString with the value "Mario Gamito".
How can I access "Mario Gamito" from within a JavaScript function, i. e., the variable's value ?
Already tried '" + mystring + "' but it doesn't works.
Any help would be appreciated.
答1:

















































答2:
you can also try pushing the variable to javascript using the registerClientScriptBlock









出处:http://blodfox777.cnblogs.com/