In my Controllers I obviously #include namespaces so I don't have to write out the entire thing when making objects. What is the way to do this inside the aspx/ascx View files? Currently I am having to write out these entire namespaces and it's getting pretty lame.
+5
A:
You'll want to use the Import
directive.
<%@ Import Namespace="Someplace.Models" %>
bdukes
2010-10-06 19:14:24
Thank you very much. Do you know if it is possible to consolidate multiple namespace references to one Import tag? Maybe some delimiter after the = or something?
shogun
2010-10-06 19:50:53
I don't believe so
bdukes
2010-10-06 20:07:12