Just out of curiosity...
Is there a way to add "using" to an ASPX/ASCX file?
eg. something like
<% using umbraco.NodeFactory; %>
So you can do
<%= Node.GetCurrent().Name %>
instead of
<%= umbraco.NodeFactory.Node.GetCurrent().Name %>
You are looking for the @Import directive.
At the top of the control or page (can be mixed and matched with other directives):
<%@ Import Namespace="MyNamespace" %>
Or (different placing of the @ character):
<% @Import Namespace="MyNamespace" %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With