title: How to set a text of label in javascript by using the text of dynamically generated label's?
body: <pre><code>{
  SqlDataReader reader = cmdAuthors.ExecuteReader();
             RadioButton rb;
             Label lb;
             while(reader.Read()){
               rb=new RadioButton();
               lb=new Label();
               lb.Text=reader[0].ToString();
             rb.Attributes.Add("OnClick","getSelectedAuthor('"+lb.Text.ToString()+"')");
                  PlaceHolder1.Controls.Add(rb);
                  PlaceHolder1.Controls.Add(lb);
                  PlaceHolder1.Controls.Add(new LiteralControl("&lt;br /&gt;"));
  
              }
  }
  </code></pre>
  
  <p>// I dont know what to write in this function  in order to Label2.text=Text;
      // document.getElementById("Label2").value=text does not work</p>
  
  <p>function getSelectedAuthor(text) {</p>
  
  <p>}</p>
  
  <pre><code> &lt;div&gt;
          &lt;asp:Label ID="Label2"  runat="server" Text="" &gt;&lt;/asp:Label&gt;
      &lt;/div&gt;
  </code></pre>