ASP.NET“特殊"标签

编程入门 行业动态 更新时间:2024-10-27 02:21:41
本文介绍了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 内联表达式".Visual Studio 2008 语法高亮设置对话框将这些称为HTML 服务器端脚本".微软的人在他们的博客中称他们为代码块".

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.

  • 是一个 ASP.NET 网页指令.用于页面和控件以配置页面/控件编译器设置().
    • 也是一个 应用指令.用于为 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.

      还有一个代码声明块,最终的嵌入式代码块形式.

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

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

      这用于将附加成员(方法等)包含到从 ASP.NET 标记生成的类中.仅提供这些"主要是为了保持与旧 ASP 技术的向后兼容性",不推荐使用.

      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“特殊"标签

本文发布于:2023-11-09 20:15:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573320.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标签   ASP   NET   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!