Hi sunil,
Design.aspx
<div>
<asp:radiobuttonlist id="RadioButtonList1" runat="server" xmlns:asp="#unknown">
RepeatDirection="Horizontal">
</div>
Code Behind:
protected void Page_Load(object sender, EventArgs e)
{
string cs = ConfigurationManager.ConnectionStrings["samplecnstring"].ConnectionString;
SqlConnection cn = new SqlConnection(cs);
SqlCommand cmd = new SqlCommand("select countryname from country", cn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "country");
RadioButtonList1.DataSource = ds;
RadioButtonList1.DataTextField = "countryname";
RadioButtonList1.DataValueField = "countryname";
RadioButtonList1.DataBind();
}
Practice well,
Have a good time!!!