ASP.NET HTML Tarafında Takla Atma İşlemleri
|Asp.NET Web Forms
<%@ %>is used for page level directives. (
<%@ Control Inherits="MyParentControl" %>)
<% %>is for inclusion of server-side code to the
<% x = x + 1; %>) of the generated class
<%= %>is equivalent of
Response.Write();call in the
<%: %>is the same as previous, but the output is HTML encoded (see below)
<%# %>is used for data-binding expressions. The data-binding expressions can be used in attributes of server tags to assign calculated values to properties. Also they can be used like a separate tag. In this case a
DataBoundLiteralControlinstance is automatically generated for the expression to assign a value to its
Textproperty. These expressions are evaluated and assignments are executed when the
DataBindingevent is fired for the control that contains data-binding expression, because for every such a control an event handler is generated of these expressions.
<%$ %>is used for custom expression binding. E.g. for localized string resources. Can only be used in attributes of server tags to assign calculated values to properties. These assignments are added to the
OnInit()method of the generated class. See http://msdn.microsoft.com/en-us/library/d5bd1tad.aspx
<%-- --%>is used for server-side comments.