place this style tag in head part
<style type="text/css">
.mystyle
{
color: Blue;
background-color: Red;
border: 2px solid #DCDCDC;
}
.nocolor
{
background-color: White;
}
</style>
place this script in head part
<script type="text/javascript">
var previousbox = 'TextBox1';
function changecolor(rid) {
document.getElementById(rid).className = "mystyle";
document.getElementById(previousbox).className = "nocolor";
previousbox = rid;
}
</script>
and your design code should like this
<table width="50%">
<tr>
<td>
<input type="radio" id="Radio1" onclick="changecolor('TextBox1')" name="a" /><asp:TextBox
ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<input type="radio" id="Radio2" onclick="changecolor('TextBox2')" name="a" /><asp:TextBox
ID="TextBox2" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<input type="radio" id="Radio3" onclick="changecolor('TextBox3')" name="a" /><asp:TextBox
ID="TextBox3" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<input type="radio" id="Radio4" onclick="changecolor('TextBox4')" name="a" /><asp:TextBox
ID="TextBox4" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<input type="radio" id="Radio5" onclick="changecolor('TextBox5')" name="a" /><asp:TextBox
ID="TextBox5" runat="server"></asp:TextBox>
</td>
</tr>
</table>