I saw how it can be done in MVC, but for a specific project I'm using Web-Forms.
I have
<asp:PlaceHolder ID="PlaceHolder1" runat="server">
<%: System.Web.Optimization.Scripts.Render("~/file.js") %>
</asp:PlaceHolder>
which generates the html:
<script src="/file.js?v=5jui8vHEj5_iAkaGiAccPPb2LcsdK1jQ1"></script>
I wish to add the sync attribute to the above tag.
I'd appreciate some guidance. Thanks.
This method would should the magic:
I extract from:
Bundling and Minification
You can use RenderFormat to achieve this:
Renders as:
<script src="/file.js" async=""></script>