HTML controls not accessible from code behind when EXT.net controls exist in the aspx page

  1. #1

    HTML controls not accessible from code behind when EXT.net controls exist in the aspx page

    aspx Page:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="FFMS.QEDModule.WebForm1" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div id="testdiv" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            <asp:Button ID="Button1" runat="server" Text="Button" />
        <table runat="server" id="maintable"></table>
        </div>
        </form>
    </body>
    </html>
    in code behind I cant access the table ("maintable") but if I delete the resource manager tag I can access all html controls.
  2. #2
    Ext.Net cannot affect on accessing to controls in code behind
    For me, your sample works fine

    <%@ Page Language="C#" AutoEventWireup="true" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            maintable.Visible = false;        
        }
    </script>
    
    
    <!DOCTYPE html>
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div id="testdiv" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            <asp:Button ID="Button1" runat="server" Text="Button" />
        <table runat="server" id="maintable"></table>
        </div>
        </form>
    </body>
    </html>
  3. #3
    I am building my project MVC and I am including WebForm page but I am not able to see EXT controls and HTML controls in code behind here is my page:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Inputs.aspx.cs" Inherits="FFMS.QEDModule.Inputs"  %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
    
     
        <div dir="rtl" id="div1" runat="server">
            <table align="center" runat="server">
                <tr>
                    <td id="GroupsTD">
                        <ext:ComboBox runat="server" ID="Groups" Editable="false" FieldLabel="????????">
                            <DirectEvents>
                                <Select OnEvent="BindQueryCombo">
                                    <ExtraParams>
                                        <ext:Parameter Name="GroupID" Value="App.Groups.getValue()" Mode="Raw"/>
                                    </ExtraParams>
                                </Select>
                            </DirectEvents>
                        </ext:ComboBox>
                        </td>
    
    
                    <td id="QueryTD">
                         <ext:ComboBox runat="server" ID="QueryCombo" Editable="false" FieldLabel="?????????">
                              <DirectEvents>
                                <Select OnEvent="DrawInputs">
                                    <ExtraParams>
                                        <ext:Parameter Name="QueryName" Value="App.QueryCombo.getValue()" Mode="Raw"/>
                                    </ExtraParams>
                                </Select>
                            </DirectEvents>
                        </ext:ComboBox>
                    </td>
                </tr>
            </table>
    
            <br />
            <br />
            
            
            <table align="center" runat="server" id="InputsTable1" dir="rtl"> 
    
    
            </table>
    
    
            <input type="hidden" runat="server" id="FieldsNames" value="1234" />
            
    
    
    
            <br />
            <br />
            <br />
            <table align="center" runat="server">
                <tr>
                    <td>
                        <ext:Button runat="server" ID="Submit" Text="?????" Width="100">
                            <%--<DirectEvents>
                                <Click OnEvent="SubmitClick">
                                    <ExtraParams>
                                        <ext:Parameter Name="QueryName" Value="App.QueryCombo.getValue()" Mode="Raw"/>
                                    </ExtraParams>
                                </Click>
                            </DirectEvents>--%>
                            <Listeners>
                                <Click Handler="alert(document.getElementById('FieldsNames').value);" />
                            </Listeners>
                        </ext:Button>
                    </td>
                </tr>
            </table>
            
        </div>
        
    
        
           <ext:ResourceManager ID="ResourceManager1" runat="server" />
     
    
    </body>
    </html>
    I cant access any of these controls in the code behind knowing that if I delete the resource manager and all the ext.net controls I can access the html controls from the server side.

Similar Threads

  1. Replies: 2
    Last Post: Jul 05, 2014, 5:33 AM
  2. Replies: 0
    Last Post: Aug 21, 2013, 6:13 AM
  3. Replies: 2
    Last Post: Jul 26, 2013, 10:17 PM
  4. Replies: 2
    Last Post: Feb 01, 2012, 8:53 PM
  5. [CLOSED] Why this code appears when add controls to a page?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 11, 2010, 12:39 PM

Tags for this Thread

Posting Permissions