title: C# user control interact with control on parent page
body: <p>I have a web form where I have a Label and a user control.
  I would like that the user control would be able to change the value of the text in the Label.</p>
  
  <p>How can I indicate to the user control what Label to change?
  (In the example I have a single Label a a single instance of the user control, but I will need to have several of both)</p>
  
  <p>EDIT:The user interaction with the user control triggers the update of the external label.</p>
  
  <p>EDIT2: Adding more details.
  My user control has a gridview, when the user adds or edit a line to the grid, I want to update the value in the label with the sum over a column of the grid.
  Currently I'm using the code server side, as the request to update or insert goes to the server.
  If possible, I prefer to do the update on the client side, as that would allow me to update my label without having to reload the whole page.</p>
  
  <p>Solution: changed to use devexpress components, I use the aspxgridview client side event EndCallback in the user object. I defined a property in my user object to store the javascript function to be called in the EndCallback callback.
  This Property can be filled by the container page, as there I know all the IDs I need.</p>
  
  <p>The code I have is:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
        &lt;uc1:InvoiceItems runat="server" ID="InvoiceItems" /&gt;
        &lt;asp:Label ID="Label1" runat="server" Text="Label"&gt;&lt;/asp:Label&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>