Click here to Skip to main content
14,770,048 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a user control called AddressEdit, that contains two drop down list boxes inside a update panel like this:

<asp:UpdatePanel ID="upCountry" runat="server" >
    <ContentTemplate>
   <tr class="row">
            <td class="item-name">
                <%#GetLocaleResourceString("Account.Country")%>:
            </td>
            <td class="item-value">
                <asp:DropDownList ID="ddlCountry1" AutoPostBack="true" runat="server"  OnSelectedIndexChanged="ddlCountry1_SelectedIndexChanged"
                    Width="137px">
                </asp:DropDownList>
            </td>
        </tr>

        <tr class="row">
            <td class="item-name">
                <%#GetLocaleResourceString("Account.StateProvince")%>:
            </td>
            <td class="item-value">
                <asp:DropDownList ID="ddlStateProvince1" AutoPostBack="False" runat="server" Width="137px">
                </asp:DropDownList>
            </td>
        </tr>
   </ContentTemplate>
</asp:UpdatePanel>


And I am using this user control in a repeater.

<asp:Repeater ID="rptrBillingAddresses" runat="server">
            <ItemTemplate>
                <div class="address-item">
                    <CtrlAddressDispla:AddressDisplay ID="BillingAddresses" runat="server" Address='<%# Container.DataItem %>'
                        ShowEditButton="true" ShowDeleteButton="true" />
                </div>
            </ItemTemplate>
            <SeparatorTemplate>
                <div class="clear">
                </div>
            </SeparatorTemplate>
        </asp:Repeater>



Now problem is that, whenever I change country in ddlCountry its causing full page post back instead of partial postback.

How to resolve this problem?
Posted

Without seeing the code for your ScriptManager I can't be 100% sure but I think you need to set EnablePartialRendering on the ScriptManager to true:

http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.enablepartialrendering.aspx[^]
   
Comments
Suresh Suthar 31-Oct-11 10:16am
   
It is already enabled. If I directly use this user control on a page (not in repeater) its working fine.
tumap90tvt 19-Dec-13 21:19pm
   
I have same problem and i still find the solution :(
add ClientIDMode="AutoID" to your dropdownlist or in page attribute
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900