void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
Hashtable hash = new Hashtable();
hash.Add("北京", "010"); hash.Add("廣州", "020"); hash.Add("上海", "021");
hash.Add("天津", "022"); hash.Add("成都", "028"); hash.Add("濟南", "0531");
RadioButtonList1.DataSource = hash;
RadioButtonList1.DataTextField = "Key";
RadioButtonList1.DataValueField = "Value";
RadioButtonList1.DataBind();
}
}
來源:https://mjgforever.cnblogs.com/