Return to Snippet

Revision: 47184
at June 2, 2011 03:02 by inreflection7


Updated Code
When adding JavaScript files to an ASP.NET page, always use asp:ScriptManager.

Instead of this:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript" src="~/App_Atom/ux/js/IframeOnClick.js"></script>
    <script type="text/javascript" src="~/App_Atom/ux/js/common.js"></script>

Do this:
        <asp:ScriptManager runat="server">
            <Scripts>
                <asp:ScriptReference Path="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" />
                <asp:ScriptReference Path="~/App_Atom/ux/js/IframeOnClick.js" />
                <asp:ScriptReference Path="~/App_Atom/ux/js/common.js" />
            </Scripts>
        </asp:ScriptManager>

btw asp:ScriptManager goes in the MasterPage. If it's a sub-page then use asp:ScriptManagerProxy.

Revision: 47183
at June 2, 2011 02:52 by inreflection7


Initial Code
When adding JavaScript files to an ASP.NET page, always use asp:ScriptManager.

Instead of this:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript" src="~/App_Atom/ux/js/IframeOnClick.js"></script>
    <script type="text/javascript" src="~/App_Atom/ux/js/common.js"></script>

Do this:
        <asp:ScriptManager runat="server">
            <Scripts>
                <asp:ScriptReference Path="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" />
                <asp:ScriptReference Path="~/App_Atom/ux/js/IframeOnClick.js" />
                <asp:ScriptReference Path="~/App_Atom/ux/js/common.js" />
            </Scripts>
        </asp:ScriptManager>

Initial URL


Initial Description


Initial Title
< script > in ASPX

Initial Tags
javascript

Initial Language
ASP