<script type="text/javascript">
/* <![CDATA[ */
var on_id = 1;
if (<%=GetValue() %>) {
on_id = <%=GetValue() %>;
}
</script>
I do get 2 syntax errors: at the 2nd closed brachet: after %> and at ; after again %>. GetValue() is a public decimal method defined in code behind.
How can I achieve this?
<![CDATA[thingy looks suspicious.