i wonder if there is any way to call an asp method that returns a string or something when you are in <script></script> tags.
Like this (it does not work):
<script language="javascript" type="text/javascript">
function isValid() {
var required = "<%= callAspMethodThatReturnsSomething() %>";
}
</script>
any help with this? thx!
The issue is that you are calling a method on the master page from the content page directly.
You can’t do that – you need a reference to the strongly typed master page.
Try this (asp.net 4.0):
Or this (pre 4.0):