troubleshooting Question

Referencing Controls in Data Repeater using C#.Net

Avatar of tsqlguy
tsqlguyFlag for United States of America asked on
.NET ProgrammingASP.NET
4 Comments1 Solution497 ViewsLast Modified:
Good Afternoon,

I'm looking for some assistance with a Data Repeater in

The repeater I have contains an item template that has the the following code...

                        <asp:Button ID="btnEdit" runat="server" Text="Edit" Width="50px" />
                        <asp:Label ID="lblLanguage" runat="server" Text=<%#DataBinder.Eval(Container.DataItem,"Language")%> />
                        <asp:Label ID="lblRegion" runat="server" Text=<%#DataBinder.Eval(Container.DataItem,"Region")%> />
                        <asp:Label ID="lblMsg_ID" runat="server" Text=<%#DataBinder.Eval(Container.DataItem,"Msg_ID")%> />
                        <asp:TextBox ID="txtPriority" runat="server" Width="40px" Text=<%#DataBinder.Eval(Container.DataItem,"Priority")%> />

My question is that the txtPriority control gets populated with an integer from SQL Server per item in the repeater.

I need to be able to allow a user to click a save button after updating any of these values, and then I need to be able to reference each of the values, and update them in their respective records in the database.

The problem is that I can't reference txtPriority directly because it obviously does not use the same control id multiple times in the page.

If anyone can assist me with this issue it would be most highly appreciated.

Thank you in advance for your time!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros