[FIXED] ScriptContainer cannot be found within a user control

  1. #1

    [FIXED] ScriptContainer cannot be found within a user control

    When
    <cool:ScriptContainer>
    tag is in a user control that renders in the head element it cannot be found by the coolite controls and their css and scripts render last. A recursive search should fix this?
  2. #2

    RE: [FIXED] ScriptContainer cannot be found within a user control



    Hi alterin,

    I apologize for the delay in getting back to you. We have fixed the problem and the code will be included with our version 0.4.1 (or higher) release which should be published right away.

    Here's a code sample demonstrating the ScriptContainer included within a CustomUserControl which is added to the <head>.

    .aspx
    <%@ Page Language="C#" %>
    
    <%@ Register 
        src="Head_ScriptContainer.ascx" 
        tagname="Head_ScriptContainer" 
        tagprefix="uc1" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>ScriptContainer within UserControl</title>
        
        <uc1:Head_ScriptContainer ID="Head_ScriptContainer1" runat="server" />
        
        <script type="text/javascript">
            // my custom javascript here
        </script>
        
    </head>
    <body>
        <form id="form1" runat="server">
            <cool:ScriptManager ID="ScriptManager1" runat="server" /> 
            
                <cool:Window 
                    ID="Window1" 
                    runat="server" 
                    AutoShow="true" 
                    Collapsible="true">
                    <Content>
                        Success!!
                    </Content>
                </cool:Window>
            
    
        </form>
    </body>
    </html>
    .ascx
    <%@ Control Language="C#" ClassName="Head_ScriptContainer" %>
    <!-- Begin Script Container -->
    <cool:ScriptContainer ID="ScriptContainer1" runat="server" />
    <!-- End Script Container -->
    Thanks for reporting the problem.

    Hope this helps.
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] Error: The control with ID 'cmbMenu' not found
    By Sevilay Tanış in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 13, 2012, 9:44 AM
  2. Replies: 4
    Last Post: Feb 16, 2012, 6:06 PM
  3. Replies: 2
    Last Post: Feb 06, 2012, 9:06 AM
  4. Replies: 2
    Last Post: Nov 02, 2011, 7:07 AM
  5. how to upload user control dynamicaly on user control
    By archana mahadule in forum 1.x Help
    Replies: 1
    Last Post: Jan 13, 2011, 12:05 PM

Posting Permissions