Using import aliasing in one file/class, we can reference class library namespaces by assigning our own custom alias like this:
\' VB
Imports Db = Company.Li
In your web.config file for your website - or most likely app.config file for a project (not confirmed)
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
anything that you put in this section should be a valid replacement for the Imports clause on the top of your code behind pages. Worked wonders for me, let me know if it helps you out
Yes this is a supported scenario in VB.Net projects. The way to do this is the following
This will set up the alias for all files in the project.
This however does not work in C# projects. C# as a language doesn't have the concept of a global using/import. Instead it only supports them at the file level.