Change the name of the radiobutton in the gridview while render
<p>After render group name comes in the name attribute with different name for each radiobutton in the gridview.</p>

<p>I tried to set all the names as same. But when we see the source in the browser it is unique.</p>

<p>How to change the name for all the radiobutton in the gridview as same.</p>

<pre><code>protected override void Render(HtmlTextWriter writer)
{
    System.IO.StringWriter sw = new System.IO.StringWriter();
    HtmlTextWriter htw = new HtmlTextWriter(sw);
    base.Render(htw);
    htw.Close();
    string h = sw.ToString();

    RadioButton first = (RadioButton)gvAddOption.Rows[0].Cells[3].FindControl("rblValue");
    string uniqGroupName = first.UniqueID;
    uniqGroupName = uniqGroupName.Replace(first.ID, first.GroupName);


    foreach (GridViewRow row in gvAddOption.Rows)
    {
        RadioButton val = (RadioButton)row.Cells[3].FindControl("rblValue");
        string eachGroupName = val.UniqueID;
        eachGroupName = eachGroupName.Replace(val.ID, val.GroupName);
        //h.Replace("name=\"" + eachGroupName + "\"", "name=\"" + uniqGroupName + "\"");

        h.Replace(eachGroupName, uniqGroupName);

    }

    writer.Write(h);
}
</code></pre>

<p>Thanks.</p>
