I’m planning to utilize the global import for System.Data package. After I added the
<%@ Import Namespace="System.Data" %>
in the markup of global.asax
In one of my class I removed ‘Using System.Data’ on top of the code.
I built the global.asax and the class.
But instead of built successful, I received error
The name ‘CommandType’ does not exist in the current context.
I think you might need to import the
System.Data.SqlClientnamespace too, assuming that’s a command object it’s failing on.EDIT
If you want certain namespaces available to all pages, try adding them in the web.config instead: