protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string name = Request.QueryString["votename"];
Label1.Text = name;
string id = Request.QueryString["voteid"].ToString();
SqlConnection sqlcn = new SqlConnection("Data Source=.;Initial catalog=voet;Integrated security=true");
sqlcn.Open();
SqlCommand sqlcmd = new SqlCommand("select * from dbo.ItemInformation where voteId=" + id, sqlcn);
DataTable dt = new DataTable();
dt.Load(sqlcmd.ExecuteReader());
RadioButtonList1.DataSource = dt;
RadioButtonList1.DataTextField = "selectName";
RadioButtonList1.DataValueField = "selectId";
RadioButtonList1.DataBind();
sqlcn.Close();
RadioButtonList1.SelectedIndex = 0;
}
}