What difference does it make if we write a script manager with an end tag and a script manager as an empty tag in asp.net

what difference does it make if we write a script manager with an end tag and a script manager as an empty tag in this format:

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

and script as an empty tag.

 <asp:ScriptManager runat="server"/>

I found this question in some interview questions book .. plez give me some knowledge about this or give me any link ..

+3
source share
3 answers

If you don't need to embed javascript, then using an empty tag uses fewer bytes, as this is a shorter way to do the same.

javascript, "end tag", script ... . :

    <asp:ScriptManager runat="server" ID="ScriptManager1">
       <Scripts>
         <asp:ScriptReference Path="sample.js" />
       </Scripts>
    </asp:ScriptManager>

, , "" , , .

: http://www.wrox.com/WileyCDA/Section/Using-the-ASP-NET-AJAX-ScriptManager.id-305492.html .

,

+1

, , , , .

, , ASP.Net( ). :

<asp:DropdownList id="bob" runat="server" />

, , <asp:ListItem /> ... - / , .

+2

, ( , ).

+1

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


All Articles