locked
Adding UpdatePanel in Application Page RRS feed

  • Question

  • Hi Folks,

          I have a ApplicationPage where i have dropdown and a commandButton.I need to use updatepanel for on dropdown Ctrl and Button ctrl.How can we do it?

    have addeed the below code for adding updatepanel for

                  <asp:UpdatePanel ID="upTroubleCode1" runat="server" UpdateMode="Always" >
    
            <ContentTemplate >
            <asp:Button ID="btnSubmit" runat="server" Text="Submit" Width="89px" Font-Size="Medium" BackColor="#CF0000" ForeColor="White" OnClick="btnSubmit_OnClick" />
            </ContentTemplate>
            </asp:UpdatePanel>

     so when we click on Button nothing is happening.

    How we can add updatepanel for DropDown and as well CommandButton

     

    Thanks & regards

    Pulikkan

    Thursday, September 23, 2010 9:35 AM

Answers

  • So this is a super old question, but I just stumbled on it and thought I would answer for anyone else who needs it. 

    You shouldn't add just the button to an update panel, that does nothing helpful. What you should do is add an update panel around the controls that need to be refreshed and then specify a Trigger for that update panel. The way you have it now, when you click the button it updates the controls in the update panel that the button is in. Which is just the button. Same goes for the drop down. If you want other things to get updated as well, either put them all in the same update panel or specify Triggers for the update panels.

    Friday, August 19, 2011 11:13 PM

All replies

  • i don't know what you do in the eventhandler for the button click, but normally all the controls you try to update/work with need to be in the same update panel
    Thursday, September 23, 2010 9:39 AM
  • inside the CommandButton im Saving some data to the Sharepoit list and checking some required field validators and everything fine will show anotherpanel.

     

    In DropDown selectionChange will show Some values in the LabelBox

     

    Thanks & regards

    Pulikkan

    Thursday, September 23, 2010 10:02 AM
  • So this is a super old question, but I just stumbled on it and thought I would answer for anyone else who needs it. 

    You shouldn't add just the button to an update panel, that does nothing helpful. What you should do is add an update panel around the controls that need to be refreshed and then specify a Trigger for that update panel. The way you have it now, when you click the button it updates the controls in the update panel that the button is in. Which is just the button. Same goes for the drop down. If you want other things to get updated as well, either put them all in the same update panel or specify Triggers for the update panels.

    Friday, August 19, 2011 11:13 PM