0

I have a drop down list box on my page. I enclosed the drop down in an update panel so that users cannot see the postback occurring. when I select something from that drop down box, the drop down box becomes smaller than usual. This behavior was not happening when I did not put the drop down in the update panel. It started happening when I put it inside the update panel. Below is my code :

<div class="ui-block-b ui-margins" >
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <label for="field_Address_DOT_State" class="required"  >State</label>
    
    <asp:DropDownList   ID="ddlState" runat="server" OnSelectedIndexChanged="ddlState_Changed" AutoPostBack="true" AppendDataBoundItems="true">
        <asp:ListItem Text="Please Select" Value="-1"></asp:ListItem>
    </asp:DropDownList>
        </ContentTemplate>
        <Triggers>
             <asp:AsyncPostBackTrigger ControlID="ddlState" EventName="SelectedIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>   
</div>

Below is the image when I did not put the update panel around the drop down and select something from drop down:

enter image description here

Below is the image when I did put the drop down inside update panel and select something from drop down box:

enter image description here

I am not sure why this behavior is happening.

Any help will be highly apprecaited.

rimi
  • 624
  • 5
  • 15
  • If you inspect the elements using browser F12, are the inputs missing any classes after the postback? If certain classes are added programmatically, that could be an issue. – JohnPete22 Feb 22 '21 at 17:28
  • Potentially related: https://stackoverflow.com/questions/3708386/ajax-update-panels-and-styles – JohnPete22 Feb 22 '21 at 17:32

0 Answers0