PDA

View Full Version : [CLOSED] App is undefined



maurox
Feb 12, 2015, 9:49 AM
Hello

in my solution all controls are undefined.

For example:


<Items>
<ext:TextArea ID="TextArea1" runat="server" EmptyText="[Incolla qui il testo]" AutoUpdateData="true" />
</Items>

ResourceManager (in master page)

<ext:ResourceManager runat="server" ID="resourceManager1" Theme="Neptune" ScriptMode="Debug" ShowWarningOnAjaxFailure="true" >

is always undefined if i try to do this:

App.TextArea1.clear()

i've installed ext.net with NuGet package and i never override namespaces.
i've a masterpage with resource manager and 1 child page...

Whats wrong?

Thanks

maurox
Feb 12, 2015, 10:54 AM
The problem occurs when i use master page.

if i make sigle page it works well...

FpNetWorth
Feb 12, 2015, 12:10 PM
Hi @maurox,

When you use a Master Page, controls have the ContentPlaceHolderID appended to them. Thus they become ContentPlaceHolderID_ControlId

Check the sample below:


<asp:Content ID="sampleHeadContent" ContentPlaceHolderID="headContent" runat="server">
</asp:Content>
<asp:Content ID="sampleMainContent" ContentPlaceHolderID="mainContent" runat="server">
<ext:TabPanel ID="tabPanel" Width="960" runat="server" Height="599" Padding="1">
<Items>
<ext:Panel ID="panel" runat="server" Title="Sample" Height="544">
</ext:Panel>
</Items>
</ext:TabPanel>
</asp:Content>

Therefore, the TabPanel and Panel can be referred to as


App.mainContent_tabPanel

and


App.mainContent_panel

maurox
Feb 12, 2015, 12:33 PM
Ok, now it works!

Thanks a lot!

FpNetWorth
Feb 12, 2015, 12:54 PM
Glad to help!

fabricio.murta
Feb 13, 2015, 5:16 PM
Hello, @maurox and @FpNetWorth;

Glad it was resolved, it didn't even need us this time.

Thank you very much @FpNetWorth, your help is greatly appreciated!