的更多细节我的问题:

HTML和JavaScript被称为 “客户端代码”。

下在文件后面的代码#和VB被称为“服务器端代码”。

因此,什么是直列-ASP,和 'RUNAT =服务器' 码块调用?

<!-- This is called "client-side" -->
<p>Hello World</p>
<script>alert("Hello World");</script>

...

// This is called "server-side"
public void Page_Load(object sender, EventArgs e)
{
    Response.Write("Hello World");
}

...

<%-- What is this called ??? --%>
<asp:Label ID="MyLabel" runat="server" />
<% Response.Write("Hello World"); %>

我能拿出最好的术语是“Web窗体代码”。

有帮助吗?

解决方案

要明确的是,微软称它们为嵌入式代码块。

http://msdn.microsoft.com/en-us/library/ ms178135.aspx

它们是通过在呈现阶段被调用包埋到页面的生命周期的代码块。

其他提示

The sections of an ASP page that start with <% and end with %> are code render blocks and <script> elements with runat=server are called code declaration blocks. The code inside them is server code.

The parts that begin with <%@ are directives. The code render blocks that begin with <%= is just short hand for a call to writer.Write() in the Page.Render() method.

In the ASP section of the MSDN site they are referred to as "script commands", "server side script commands" and "primary script commands".

Below I have included excerpts from the MSDN site and a reference link.

ASP uses the delimiters <% and %> to enclose script commands. Within the delimiters, you can include any command that is valid for the scripting language you are using.

Commands enclosed by delimiters are called primary script commands, which are processed using the primary scripting language. Any command that you use within script delimiters must be valid for the primary scripting language. By default, the primary scripting language is VBScript, but you can also set a different default language.

(http://msdn.microsoft.com/en-us/library/ms524741.aspx)

I call them "server tags" or "server-side tags".

No idea if this is correct or not.

Code in the aspx file is called "the markup". That includes static html, as well. If you want to narrow it down to code within <% %> tags just say "code blocks".

The <% %> tags themselves and similar are called "Bee Stings". Note that this is just for the different types of <% %> tags, not the code blocks you create with them.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top