Hello,

This morning I have been investigating the placement of script files and the Ext.onReady script block within the page.

I have attempted to use the ResourcePlaceHolders to achieve moving the includes to the bottom of the page as this is said to improve the performance. My simple page is this:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <ext:ResourceManager runat="server" />
    <ext:Panel runat="server" Title="Hello World" Frame="true">
        <Content>
            <p>Hello World</p>
        </Content>
    </ext:Panel>
    <ext:ResourcePlaceHolder runat="server" Mode="Script" />
</body>
</html>
This is throwing an index out of range error when processing the script tag placeholders in InitScriptFilter on the following line (line no. 183):

this.html.Remove(index, placeHolderMarker.Length);
It appears that it removes the <Ext.Net.InitScript> ... </Ext.Net.InitScript> block and then attempts to remove the placeHolderMarker. However, in removing the <Ext.Net.InitScript> block first you are changing the index location of <Ext.Net.InitScriptPlaceHolder> which then invalidates the call to this.html.Remove() shown above.