string id = Request.QueryString["id"];
if (!string.IsNullOrEmpty(id))
{
for (int i = 0; i < LanId.Items.Count; i++)
{
if (LanId.Items[i].value == id)
{
LanId.Items[i].Selected = true;
break;
}
}
}
for (int i = 0; i < radiobuttonlist.Items.Count; i++)
{
if (radiobuttonlist.Items[i].value== "3")
{
radiobuttonlist.Items[i].Selected = true;
}
}
RadioButtonList1.Items[i].Selected = true;
i即是你传过来的参数。
if (Request["id"丛模闷码指] != null)
{
LanId.Items.FindByValue(Request["渗弯id"]).Selected = true;
}
if(!IsPostBack)
{
radiobuttonlist.Items.selectecindex=3+1;
}