I've searched the internet and didn't find a working answer for my question.
The question is when I use a text-box and a button in an ASP:Repeater for my C# ASPX Website to update a column of SQL Server table, I can't access the textbox and the button in the code-behind (ASPX.CS) page. However I've find a way to "show" those controllers (the text-box and the button) in the ASP:Repeater in the link below, but I can't actually use those to update the database of the website.
Can't find control within asp.net repeater?
I'd be glad if anyone know how to solve this problem, reply this.
Here is a sample code of demonstrating the problem:
ASPX Page
<asp:Repeater runat="server" ID="Commentha" >
<ItemTemplate>
<div id="comment list" style="direction: rtl; font-family: '2 Nazanin','Adobe Arabic'; font-size: large;">
<div id="Replys">
<%--ASP LABEL FOR SHOWING ALL REPLYS FOR THIS COMMENT--%>
</div>
<div id="ReplyTo">
<div id="RT_Text">Reply</div>
<div id="ReplyToThis">
<asp:TextBox runat="server" ID="Reply" MaxLength="119"></asp:TextBox>
<asp:Button runat="server" ID="Sendit" Text="Send" />
</div>
</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
The "Reply" textbox and "Sendit" buttons are the controllers I was talking about.
And the SQL Table has this column:
ReplyTo nvarchar(120)
I am actually trying to make a "Reply to a comment" function, something similar to Facebook's "reply" button for the commenting section.