开发者

CascadingDropDown in TabContainer and Target in other Tab

开发者 https://www.devze.com 2023-01-01 14:23 出处:网络
I have divised a page with a TabContainer. Before, this page worked with a CascadingDropDown that populate a DropDownList.

I have divised a page with a TabContainer.

Before, this page worked with a CascadingDropDown that populate a DropDownList. Now this DropDownList is in another tab. So I catch an exception "Object Reference Null" when I try to see this page.

How did runs to load a DropDownList in another Tab when I change a value in a different Tab ?

Update:

Thanks for your answer, but unfortunaly it doesn't work.

I have tried with CascadingDropDownExtender outside the TabContainer, but Reference null is catched again. With CascadingDropDownExtender in same Panel as child DropDownList, I have a javascript alert that say Paren开发者_高级运维t Control not found.

Here the code with CascadingDropDownExtender in same Panel as child DropDownList

<cc2:TabPanel runat="server" HeaderText="Carte Identité" ID="TabCI">
<ContentTemplate>

  <ProspectMgt:MarketSegmentDropDownList ID="MarketSegmentDropDownList1" runat="server"
            AutoPostBack="false" Width="400px"></ProspectMgt:MarketSegmentDropDownList>

        <asp:CompareValidator ID="CompareValidator2" runat="server" CssClass="error" ToolTip="Required"
            ControlToValidate="MarketSegmentDropDownList1" ValueToCompare="-1" Operator="NotEqual"
            ErrorMessage="MktSegment" Display="Dynamic" Font-Bold="True"></asp:CompareValidator>

</ContentTemplate>
</cc2:TabPanel>
    <cc2:TabPanel ID="TabSize"  runat="server" HeaderText="Size & Volume">
<ContentTemplate>

                    <asp:DropDownList ID="DropDownListSize" AutoPostBack="false" runat="server">
                    </asp:DropDownList>  

            <cc2:CascadingDropDown ID="cddSize" runat="server" TargetControlID="DropDownListSize"  
Category="Size" LoadingText="[...]"  
ServicePath="~/Modules/ProspectMgt/WebService/ServiceAjax.asmx" ServiceMethod="GetSizeByMktId"  
ParentControlID="MarketSegmentDropDownList1" />

</ContentTemplate>    

</cc2:TabPanel>

So I don't see why it is not working. It was working perfectly without TabContainer. I'm using AjaxToolKit 30512. However, I'm looking to drop CascadingDropDownExtender and manage this issue by javascript only.


Is the CascadingDropDownExtender inside the first tab? If it is, if you pull the CascadingDropDownExtender outside the tab container altogether, does that fix the issue? Posting some markup would help resolve this more easily...

HTH.

0

精彩评论

暂无评论...
验证码 换一张
取 消