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?

How to use HttpRequestMessage truely and avoid Error 500 in HttpClient PostAsync?

It is supposed to fill “textbox1” with string value and get another string in textbox3. For this job, I inspected ASP form Elements in the website and checked in “Network” section the “POST” activities when I fill the form and submit it.Therefore I wrote this code for sending the post request and getting the response. But I get the error which tells me “Make sure request headers are used with “HttpRequestMessage” and “HttpResponseMessage”. Before I adding the headers section I got Error 500 in console. please tell me the correct coding.