Skip to content Skip to sidebar Skip to footer

Can't Use 'this' In Onload Property In An Asp.net Document

I'm trying to load my stylesheets asynchronously, as I usually do, but I'm running in to trouble on an ASP.net site I'm working on. I keep getting the following error: Compiler Er

Solution 1:

Got this working the way I wanted with the OnClientLoad property, like so:

<link rel="preload" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" as="style" OnClientLoad="this.rel='stylesheet'" />

Seems to be working properly in every browser.

Post a Comment for "Can't Use 'this' In Onload Property In An Asp.net Document"