What is the practical difference between Response.Write and <% =%>?

I ran into a problem when a third-party component apparently interferes with Response.Writeand causes the display of any content inside Response.Write("")before any other html. For example:

<html><head><title><% Response.Write("HELLO WORLD") %>

will display as

HELLO WORLD<html><head>...

However, any content created using blocks <%= %>will work correctly. The code below will work fine:

<html><head><title><%="HELLO WORLD"%>

I always assumed that I <%=was simply shortened for Response.Write. From what I managed to find on MSDN, I now understand that it <%= is ultimately converted to Response.Write, but there are apparently a few steps in between.

- , - - /, , <%= %>?

: , , Telerik AjaxManager Q1 2009 . Q2- .

, , , . , , .

+3
1

<% = "foo" % > Response.Write( "foo" ); . , ASP.NET Reflector DLL.

+6

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


All Articles