Is there a way to create a namespace alias in the .aspx file (and not in the .aspx.cs code).
For example ... in a file with a codename, you can create an alias as follows:
using MyPanel = System.Web.UI.WebControls.Panel;
In html source mode (Visual Studio), the namespace can be imported as follows:
<%@ Import Namespace="System.Web.UI.WebControls" %>
I need to do the following:
<%@ Import Namespace="MyPanel = System.Web.UI.WebControls.Panel" %>
EDIT / UPDATE: Obviously this does not work. Is this possible in some other way without using code? Yes, it really works if you remove the space (hint for @Alex hat below). Example:
<%@ Import Namespace="MyPanel=System.Web.UI.WebControls.Panel" %>
source
share