is it possible to call c# functions with javascript parameters (from javascript)?
i.e.
<script>
function someFunction()
{
var data = "123";
var test ="<% AppHelper.GetSomething("+data+"); %>";
}
</script>
Thank You !
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.
No, because ASP.NET code is run and compiled before you get to the javascript. If you want to communicate with the server using javascript, you need to use something like AJAX.
Or you might have a look at server side javascript, to see if that’s something you can use.