I am working on a codebase that, like VBScript code, is embedded in HTML. I noticed the following two different tags around the specified lines of code
<%= MyFunc(val1) %>
and
<% MyFunc(val1) %>
What is the difference in using the "=" symbol at the beginning of these sections?
<% evaluates the expression in the server code, but does not display the result.
<%
<%= also evaluates the expression, but completes the result in Response.Write, so it outputs the result.
<%=
When you see:
<%= MyFunc() %>
it really means:
<% Response.Write( MyFunc() ) %>
His short hand is for outputting the answer.
<% MyFunc() %>
, , Response.Write /Sub.
Response.Write
Source: https://habr.com/ru/post/1725964/More articles:How to merge a branch into another with the override option in git - gitManage initial switch status (and layout?) IPhone keyboards from web form - iphoneHow to test cross-domain assemblies locally? - dojodojo.requireIf does not allow local variables - dojoLua Links in Lua - garbage-collectionSettings menu via UITableView - iphoneLooking for an object in a nested NSDictionary when the parent key is unknown? - jsonMemory Leak 0x0 [iphone] - memory-leaksDoes Interlocked.CompareExchange (double, double, double) support 32-bit OS? - multithreadingShould all static property identifiers with accessories begin with capital letters? - propertiesAll Articles