Why does Microsoft.JScript work in the Code behind but not within a <% %>?
I keep getting “CS0234: The type or namespace name ‘JScript’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)” Error but it doesn’t make any sense at all. I can add the reference to Microsoft.JScript.dll and in the code behind it works, its just not working when I try to reference the thing in the web.config, or the page itself through the following code:
<%@ Import Namespace="Microsoft.JScript" %>
Web.Config
<pages>
<namespaces>
<add namespace="Microsoft.JScript" />
</namespaces>
</pages>
The Error I’m constantly getting is this:
Compiler Error Message: CS0234: The type or namespace name 'JScript' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
You need to import the assembly, not just the namespace. e.g.