How can I call a Asp.Net function within parameter the result of a javascript function ?
Something like that :
var a = <%= MyFunction(getJs()) %>;
I know that something like that work :
var a = <%= MyFunction("test") %>;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t mix server and client code.
<%= %>is executed on the server, and the javascript is executed on the client.You should probably investigate another approach. For example, depending on what your MyFunction() method does, consider porting it to your javascript.