How to find container of dynamically created button ASP.net

I have a WebForm whose controls are created dynamically as they can vary in number. Each element is a Panel containing a TextBox, a DropDownList and a Button.
Each control is given a unique ID and all the buttons have the same clickEvent. Inside the code of the clickEvent, I want to obtain the ID of the panel in which the presedButton belongs so I can access the chosen value from that Panel’s DropDownList and the text from the TextBox.
How can I do the above?

JavaScript confirm cancel button still posting

Cancel button on the confirm dialog still causing post back and calling server side button event. <asp:Button ID="btnSubmit" runat="server" CssClass="CommandButton" Width="110px" OnClientClick="confirmPayment();" UseSubmitBehavior="false" Text="Submit Payment" OnClick="btnSubmit_Click"></asp:Button> function confirmPayment() { var isOkay = confirm("Confirm Payment?"); if (isOkay) { return true; } else { return false; } } I tried to debug my code and i can … Read more