I found a job for this problem
I installed the ClientIDMode repeater first:
<asp:Repeater ID="Repeater1" runat="server" ClientIDMode="Predictable"> <ItemTemplate> <App:Product ID="prd1" runat="server" /> </ItemTemplate> </asp:Repeater>
Secondly, I added a function to btn_details on clientClick
<asp:Button ID="btn_details" runat="server" Text="פרטים נוספים" OnClientClick="Get_Product_Details(this);" />
in this function, I extract the client identifier for the button and resolve the client identifier for the hidden pid field
<asp:HiddenField ID="pid" runat="server" Value="5"/>
function that will retrieve the client identifier // ContentPlaceHolder 1_Repeater1_Prd_2_pid_2:
function Get_Product_Details(btn) { //ContentPlaceHolder1_Repeater1_Prd_2_btn_details_2 var s = btn.id; var start = s.indexOf("btn_details"); var end = s.lastIndexOf("_"); sub = s.substring(start, end); s = s.replace(sub, "pid"); var hidden = document.getElementById(s); var id = hidden.value;
source share