ClientIDMode="Static" not working?

Page 2 of 2 FirstFirst 12
  1. #11
    Another option if you want to avoid adding a ResourcePlaceHolder into the <head> is to tap into the <DocumentReady> event of the ResourceManager.

    The following sample demonstrates the whole scenario.

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
     
    <!DOCTYPE html>
         
    <html>
    <head runat="server">
        <title>Ext.NET Example</title>
    
    
        <script type="text/javascript">
            var init = function () {
                // Using Ext.getCmp
                console.log("Button", Ext.getCmp('Button1'));
    
    
                // Directly referencing the App namespace instance
                console.log("Button", App.Button1);
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server">
                <Listeners>
                    <DocumentReady Fn="init" />
                </Listeners>
            </ext:ResourceManager>
    
    
            <ext:Button ID="Button1" runat="server" IDMode="Static" Text="Submit" />
        </form>
    </body>
    </html>
    Still not ideal, but is presented as another option which may be cleaner for your application.

    Hope this helps.
    Geoffrey McGill
    Founder
  2. #12
    Thanks Geoffrey, it does help.
    That workaround will do in the meantime.
Page 2 of 2 FirstFirst 12

Similar Threads

  1. [CLOSED] How does "MaskCls" work for "AutoLoad" mask in panel control
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 19, 2012, 12:09 PM
  2. Replies: 1
    Last Post: Jun 26, 2012, 11:29 AM
  3. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  4. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM
  5. Replies: 2
    Last Post: Jun 26, 2011, 1:59 AM

Tags for this Thread

Posting Permissions