or as serve...">

ASP.NET angle brackets with '#' or '='. Who cares?

Duplicate: ASP.NET "special" tags


I work with PHP, which uses <? ?>or <?php ?>as server tags, but what is the meaning and use in ASP.NET <%**#** %>and <%**=** %>?

+3
source share
2 answers

<%# %> indicates a data binding operation and is only valid in DataBinding controls (such as DataGrid, ListView, etc.).

<%= %>is an abbreviation of HttpContext.Current.Response.Write. It will call a method .ToString()for any call to an object / method (execpt for strings, it can be smart enough not to ToString a string).

+1
source

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


All Articles