Ürfet Demirtaş
Bozkırın yağız programcısı...

ANASAYFA | HAKKIMDA | ASP.NET WEB FORM | C# | BİLGİ GÜVENLİĞİ | LINQ | T-SQL | ASP.NET MVC | GENEL | İLETİŞİM
 
 

ASP.NET HTML Tarafında Takla Atma İşlemleri

  • <%@ %> is used for page level directives. (<%@ Control Inherits="MyParentControl" %>)
  • <% %> is for inclusion of server-side code to the Render() method (<% x = x + 1; %>) of the generated class
  • <%= %> is equivalent of Response.Write(); call in the Render() method
  • <%: %> 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 DataBoundLiteralControl instance is automatically generated for the expression to assign a value to its Text property. These expressions are evaluated and assignments are executed when the DataBinding event 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.

Kaynak


Şairin de dediği gibi; 'programcı' adama hazır blog yakışmazdı.

Ürfet Demirtaş (2010) C#.Net