我在做什么错在这个ASPxPageControl? (DEV前preSS) [英] What am I doing wrong in this ASPxPageControl? (dev express)

查看:408
本文介绍了我在做什么错在这个ASPxPageControl? (DEV前preSS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我。我试图用防爆开发preSS ASPxPageControl。我想只加载第一TabPage的(和WebUserControl它包含)加载页面时,然后当我点击后续标签,加载这些WebUserControls。我已经在这里找到 等地告诉我


  

在ASPxPageControl.AutoPostBack属性设置为false,并ASPxPageControl.EnableCallBacks设置为true


但是,这不是为我工作。我与调试器加载的主页时,我的每一个WebUserControls也都加载了验证。我误解了ASPxPageControl ??

的想法

 < D​​XTC:ASPxPageControl ID =ASPxPageControl1=服务器ActiveTabIndex =0
    EnableCallBacks =真
     的AutoPostBack =假>
    <&的TabPages GT;
        < D​​XTC:TabPage的文本=详细信息NAME =tabDetail>
            < ContentCollection>
                < D​​XW:ContentControl中ID =ContentControl3=服务器>                    < uc13:WUCDetail ID =WUCDetail=服务器/>                < / DXW:ContentControl中>
            < / ContentCollection>
        < / DXTC:TabPage的>
        < D​​XTC:TabPage的文本=室NAME =tabRoom>
            < ContentCollection>
                < D​​XW:ContentControl中ID =ContentControl4=服务器>                    < uc11:WUCRoom ID =WUCRoom=服务器/>                < / DXW:ContentControl中>
            < / ContentCollection>
        < / DXTC:TabPage的>
        < D​​XTC:TabPage的文本=邮件程序NAME =tabMailers>
            < ContentCollection>
                < D​​XW:ContentControl中ID =ContentControl5=服务器>                    < UC10:WUCMailers ID =WUCMailers=服务器/>                < / DXW:ContentControl中>
            < / ContentCollection>
        < / DXTC:TabPage的>
     < /&的TabPages GT;< / DXTC:ASPxPageControl>


解决方案

  

但是,这不是为我工作。我曾与调试验证
  当主页面加载的是,我的每一个WebUserControls也都
  加载。我误解了ASPxPageControl ??

的想法

我怕你误会的例子的想法如何创建和加载一个活动标签的一种回调内容。这个例子的主要想法是创建并加载一个活动标签的一种回调的内容。
但是,您所指定的直接标记的所有网页的内容。因此,这些控件将被创建,并在任何情况下加载。请创建一个空的TabPages,然后用在这个例子中表现出的方​​法来创建和加载页面的内容只有在激活的标签变了。

Here is what I have. I am trying to use Developer Express ASPxPageControl. I want to only load the first TabPage (and WebUserControl it contains) when the page is loaded and then when I click on subsequent tabs, load those WebUserControls. I have found documentation here and other places telling me to

set the ASPxPageControl.AutoPostBack property to false, and ASPxPageControl.EnableCallBacks set to true

However, this is not working for me. I have verified with the debugger that when the main page is loaded, each of my WebUserControls are also loading. Am I misunderstanding the idea of the ASPxPageControl??

<dxtc:ASPxPageControl ID="ASPxPageControl1" runat="server" ActiveTabIndex="0" 
    EnableCallBacks="True"
     AutoPostBack="false" >
    <TabPages>
        <dxtc:TabPage Text="Detail" Name="tabDetail">
            <ContentCollection>
                <dxw:ContentControl ID="ContentControl3" runat="server">

                    <uc13:WUCDetail ID="WUCDetail" runat="server" />

                </dxw:ContentControl>
            </ContentCollection>
        </dxtc:TabPage>
        <dxtc:TabPage Text="Room" Name="tabRoom">
            <ContentCollection>
                <dxw:ContentControl ID="ContentControl4" runat="server">

                    <uc11:WUCRoom ID="WUCRoom" runat="server" />

                </dxw:ContentControl>
            </ContentCollection>
        </dxtc:TabPage>
        <dxtc:TabPage Text="Mailers" Name="tabMailers">
            <ContentCollection>
                <dxw:ContentControl ID="ContentControl5" runat="server">

                    <uc10:WUCMailers ID="WUCMailers" runat="server" />

                </dxw:ContentControl>
            </ContentCollection>
        </dxtc:TabPage>     
     </TabPages>

</dxtc:ASPxPageControl>

解决方案

However, this is not working for me. I have verified with the debugger that when the main page is loaded, each of my WebUserControls are also loading. Am I misunderstanding the idea of the ASPxPageControl??

I'm afraid you are misunderstanding the idea of the example "How to create and load an active tab's content on a callback". The main idea of this example is to create and load an active tab's content on a callback. But you've specified content for all pages directly in markup. Thus these controls will be created and loaded in any cases. Please, create an empty tabpages and then use the approach demonstrated in this example to create and load page's content only when active tab changed.

这篇关于我在做什么错在这个ASPxPageControl? (DEV前preSS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆