What are the <%%> constructs called in asp.net?

I am new to ASP.Net and I'm a little confused here.

Studying ASP.Net through some of the articles on the Internet, I notice that some experts use some key words for data binding and automatically increase the date in the source code, for example <%#Container.DataItemIndex + 1 %>, <%#Eval("Itemid")%>, <%#DataBinder.Eval(Container.DataItem, "itemStock")%>or <%=sectionId%>.

What are your designs, and where can I get a list of such keywords with an explanation?

+3
source share
8 answers

they are commonly known as inline tags; note that there are quite a few different types.

Here you can find a detailed explanation of each type:

http://naspinski.net/post/inline-aspnet-tags-sorting-them-all-out-(3c25242c-3c253d2c-3c252c-3c252c-etc).aspx

http://forums.asp.net/p/1049167/1478431.aspx#1478431

+3

, Bee-Stings:
ASP.Net, <% = <% #

  • <%@ - ///
  • <%$ -
  • <%= - , <% Response.Write( ) %>
  • <%# - . , , Page.DataBind() .
  • <% - -
  • <%: - <%=, HTMLEncodes()
+3
+2

ASP.NET MSDN, . MSDN :

<%#
<%$
<%@
<%=
0

@rahul, , ASP.net, .

<% %> .net- , .

<%# Container.DataItemIndex + 1 %> , DataGridView .. . - , , , ..

<%#Eval("Itemid")%> , (, ..) Itemid.

<%# DataBinder.Eval(Container.DataItem, "itemStock")%> , , .

term <%=sectionId%> sectionId, html.

0

" ". : GoodLink

0

, .

.

0

.

. , - , web.config , , .

<% #, <% $, <% = , ..

, , Eval, Bind ..

List of Sources:
Five Unopened Functions in ASP.NET ASP.NET
Extension
Express yourself with custom expression builders

0
source

Source: https://habr.com/ru/post/1719382/


All Articles