How to finish script tags?

I am new to web programming, reading a book on ASP.NET, and I notice that the author is doing this;

<asp:ScriptManager ID="ScriptManager1" runat="server"/>

Instead of what Visual Studio does, what it is:

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

Is the first way to make this acceptable and compatible with multiple browser shortcuts?

+3
source share
1 answer

In any case, this is acceptable, and it does not affect the output of the browser, since the tag is asp:ScriptManagerprocessed on the server side.

Saying this, it is a matter of preference what style you use. There are tags with nested tags that require a second style.

, , ASP.NET, .

, , , (, script ).

+5

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


All Articles