I have an ASP.NET website and I need to pass information to JavaScript for some tasks. Currently, I am using the following method:
<script type="text/javascript">
var userHasMicrositePhoto = '<%=hasMicrositePhoto%>';
</script>
However, I have heard that having multiple script tags like this is not ideal and it can be tedious to constantly write properties in the code behind. Is there a more efficient way to achieve this?