在ASPX缩短命名空间别名 [英] Shortened namespace alias in aspx

查看:94
本文介绍了在ASPX缩短命名空间别名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在codebehind这样定义using语句:

I have a using statement defined like this in codebehind:

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

我希望能够做到这一点在我的aspx页面:

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 %>

使用示出的技术的 href=\"http://stackoverflow.com/questions/1697169/is-it-possible-to-use-the-using-statement-in-my-aspx-views-asp-net-mvc\">here.

我可以做的更好吗?

推荐答案

试试这个:

<%@ Import Namespace="Name=Extremely.Long.And.Unwieldy.Namespace" %>

这篇关于在ASPX缩短命名空间别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆