ASP.NET"专用"标签 [英] ASP.NET "special" tags

查看:469
本文介绍了ASP.NET"专用"标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是特殊ASP.NET标签像这样正式的名称:

What is the official name for the "special" ASP.NET tags like this:

<%# %>
<%= %>
<%@ %>
<%$ %>

我似乎无法找出概念或众所周知的名字对于这些,所以我无法寻找更多的信息。作为奖励,谁能给我所有的可能的特殊标记,什么他们每个人做的快速纲要(或指向我的资源)?

I can't seem to figure out the conceptual or well known name for these, so I'm having trouble searching for more info. As a bonus, can anyone give me a quick rundown of all of the possible "special tags" and what each one of them does (or point me to a resource)?

推荐答案

的正式名称是服务器 - 端脚本的分隔符或 ASP.NET内联前pressions 」。 Visual Studio 2008中的语法高亮显示设置对话框称这些HTML服务器端脚本。微软的家伙叫他们code掘金,在他们的博客。

The official name is "server-side scripting delimiters" or "ASP.NET inline expressions". Visual Studio 2008 syntax highlighting settings dialog calls these "HTML Server-Side Script". Microsoft guys call them "code nuggets" in their blogs.


  • &LT;%@%GT; 是的指令为ASP.NET网页。用于页面和控件配置页/控制编译器设置(&LT;%@控件继承=MyParentControl%GT; )。

    • &LT;%@%GT; 也是一个的应用程序指令。用于指定Global.asax中特定应用程序设置。从页面指令不同,它只是使用了不同的标签集。

    • <%@ %> is a Directive for ASP.NET Web Pages. Used for pages and controls to configure page/control compiler settings (<%@ Control Inherits="MyParentControl" %>).
      • <%@ %> is also an Application Directive. Used to specify application-specific settings for global.asax. Distinct from the page directives as it only uses a different tag set.

      还有一个 code声明块 ,最终嵌入式code座形式。

      There is also a Code Declaration Block, the final Embedded Code Block form.

      <script runat="server">
      bool IsTrue() {
        return false;
      }
      </script>
      

      此用于包括附加成员(方法等)以从ASP.NET标记生成的类。这些都只会提供了与旧的ASP技术主要是preserve向后兼容< / em>的不推荐并使用。

      This is used to include additional members (methods etc.) to the class generated from the ASP.NET markup. These have only ever been provided "primarily to preserve backward compatibility with older ASP technology" and are not recommended for use.

      这篇关于ASP.NET&QUOT;专用&QUOT;标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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