locked
Dropdownlist SelectedIndexChanged inside AJAX UpdatePanel refresh the entire page during postback RRS feed

  • Question

  • User-34860367 posted

    Hi all,

    My ASP.NET designed many sections to allow the user input the values. One of section with dropdownlist to allow the user select an dropdown item then display prize for it. at refresh the entire page, so previous values entries were missing during post back. My question is why ASP.NET AJAX not working for update panel only?  

    Here is my code

                              <%-- STUDENT FILE  --%>
                              <tr>
                                  <td class="col-xs-1">
                                      <h5>STUDENT</h5>
                                  </td>
                                  <td class="col-xs-3">
                                      <asp:DropDownList runat="server" ID="ddlName" CssClass="selectpicker" data-style="btn-default"
                                          OnSelectedIndexChanged="ddlMake_SelectedIndexChanged" AutoPostBack="true" AppendDataBoundItems="true">
                                          <asp:ListItem></asp:ListItem>
                                      </asp:DropDownList>
                                  </td>
                                  <td class="col-xs-3">
                                      <asp:UpdatePanel runat="server" ID="UpdatePanel7">
                                          <ContentTemplate>
                                              <asp:Label runat="server" ID="lblConductGrade" CssClass="smallerText"></asp:Label>
                                          </ContentTemplate>
                                          <Triggers>
                                              <asp:AsyncPostBackTrigger ControlID="ddlName" EventName="SelectedIndexChanged" />
                                          </Triggers>
                                      </asp:UpdatePanel>
                                  </td>
                              </tr>

    I tried to us UpdatePanel but the page refresh entirely? Any idea how to solve above issue?

    Thanks in advance.

    Friday, September 2, 2016 6:49 PM

Answers

  • User-34860367 posted

    Hi,

    I tried your above suggestion before it was not working at all. The issue happened when DDL post back, then the page is refresh, so other sections, I added all UpdatePage, then it resolved my issues on missing value entries. 

    Thanks anyway.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 2, 2016 7:18 PM

All replies

  • User2103319870 posted

    One of section with dropdownlist to allow the user select an dropdown item then display prize for it. at refresh the entire page

    Try wrapping the dropdownlist controls also inside the updatepanel

    Friday, September 2, 2016 6:56 PM
  • User-34860367 posted

    Hi,

    I tried your above suggestion before it was not working at all. The issue happened when DDL post back, then the page is refresh, so other sections, I added all UpdatePage, then it resolved my issues on missing value entries. 

    Thanks anyway.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 2, 2016 7:18 PM