asp.net mvc 4 - Calling Javascript Function from ascx -


from html section of ascx file, how can call javascript function?

<div> <% if(foo(...)) %>
// calljavascriptfunction() ...

you can't, code run once in browser there isnt way answer.

you need approach problem different direction.

either move javascript code server side code, post information need in form there on server side when need it, or use web service run server side code javascript code.

what problem trying solve?


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -