Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortened namespace alias in aspx

Tags:

asp.net

I have a using statement defined like this in codebehind:

using Name = Extremely.Long.And.Unwieldy.Namespace

I want to be able to do this in my aspx page:

<%=Name.Type %>

So far the best I have come up with is this:

<%=Namespace.Type %>

using the technique shown here.

Can I do any better?

like image 926
Kev Avatar asked Apr 03 '12 21:04

Kev


1 Answers

Try this:

<%@ Import Namespace="Name=Extremely.Long.And.Unwieldy.Namespace" %>
like image 180
Abe Miessler Avatar answered Sep 27 '22 18:09

Abe Miessler