| Author: vipul 04 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Hi, you want add only "Radiobutton" string after each name or you want control after each name? if you want to control then you can used radiobutton list control
<asp:RadioButtonList ID="test" runat="server"> <asp:ListItem Text="1" Value="1"></asp:ListItem> <asp:ListItem Text="2" Value="1"></asp:ListItem> <asp:ListItem Text="3" Value="1"></asp:ListItem> <asp:ListItem Text="4" Value="1"></asp:ListItem> </asp:RadioButtonList>
and if you want to in your way than you can used repeater control this way and bind you datasource to repeater control
<asp:Repeater ID="TEST" runat="server"> <ItemTemplate> <%# Eval("Name") %><asp:RadioButton ID="rdb1" runat="server" /> </ItemTemplate> </asp:Repeater>
Please Rate This Answer If They Helpful
Thanks & Regards Patel Vipul
|
| Author: Kishor Dalwadi 04 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
Use RadiobuttonList.
And Give DataResult as a Datasource.
|
| Author: Abhay 04 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Create a datasource and asign to the radiobuttonlist
Example: .aspx
<asp:RadioButtonList ID="RadioButtonList1" runat="server"> </asp:RadioButtonList>
.aspx.cs
string strReferral = "SELECT PK_REFERRING_PHYS_ID,(last_name +', '+first_name + ' ' + middle_name ) as NAME " + "FROM m_referring_physicians mrp WHERE mrp.status = 1 "; DataSet dsPe = SqlHelper.ExecuteDataset(new Connection().GetCon, CommandType.Text, strReferral); RadioButtonList1.DataSource = dsPe; RadioButtonList1.DataValueField = "PK_REFERRING_PHYS_ID"; RadioButtonList1.DataTextField = "NAME"; RadioButtonList1.DataBind();
Thanks and Regards, Abhay
|
| Author: pradeep kumar reddy 04 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
U have to go to radio button list. and u have to choose the database from which u want to retrieve data. and u have to mention the data text field and data value field
|