Possible Duplicate:
ASP.NET “special” tags
What is the difference between <%# ... %>
, <%= ... %>
and <%$ ... %>
?
I couldn't find anything information about this. It's impossible to find "<%=" using a search engine.
Do these tags have a name?
%> is used to embed some java code within the main service() method of the JSP. It is executed during the rendering of the page. <%! ... %> is used to define code outside of the flow of the page, and therefore outside the main service() method.
A JSP expression is used to insert the value of a scripting language expression, converted into a string, into the data stream returned to the client.
It stands for Java Server Pages. It is a server side technology. It is used for creating web application. It is used to create dynamic web content. In this JSP tags are used to insert JAVA code into HTML pages.
A scriptlet tag is used to execute java source code in JSP. Syntax is as follows: <% java source code %>
<%= ... %>
is generally equivalent to Response.Write(...)
it cannot be used in a control attribute that is runat="server"
<%: ... %>
(as of .NET v4.0) is an html encoded version of <%= %>
(as @Eric mentions)
<%# ... %>
is used in data-binding context for Bind, Eval or Output (as @Ray mentions)
<%$ ... %>
is used in the context of a control attribute with runat="server" (google "expression builder" also have a look at making a general purpose 'Code' expression builder. it is evaluated when the attribute/Parameter is required by the control.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With