Option 1 - Quick fix
For your page, make ClientIDMode="static"
in page directive and then use Request.Form["TextBoxMediaID"]
to get value of your text box.
Option 2 - Debug
Go to debug mode and try AccordionPanel1.Controls[0].("TextBoxMediaID");
or AccordionPanel1.Controls[0].Controls[0].("TextBoxMediaID");
because you don't know how many server side controls are there. Simple solution would be to use find control recursive function.