protected void Button1_Click(object sender, EventArgs e)
{
string role = this.ddl_Role.SelectedValue;
string chkModelIdStr = "";
foreach (RepeaterItem item in this.rpt_power.Items)
{
CheckBoxList chkblist = (CheckBoxList)item.FindControl("chkModelId");
foreach (ListItem itemd in chkblist.Items)
{
if (itemd.Selected == true)
{
chkModelIdStr += itemd.Value + ",";
}
}
}
if (chkModelIdStr != "")
{
chkModelIdStr = chkModelIdStr.Substring(0, chkModelIdStr.Length - 1).Trim();//去掉最后一个,
}
string chkstr = chkModelIdStr;
Response.Redirect("default2.aspx?role=" + role + "&chkstr=" + chkstr + "");
}
{
string role = this.ddl_Role.SelectedValue;
string chkModelIdStr = "";
foreach (RepeaterItem item in this.rpt_power.Items)
{
CheckBoxList chkblist = (CheckBoxList)item.FindControl("chkModelId");
foreach (ListItem itemd in chkblist.Items)
{
if (itemd.Selected == true)
{
chkModelIdStr += itemd.Value + ",";
}
}
}
if (chkModelIdStr != "")
{
chkModelIdStr = chkModelIdStr.Substring(0, chkModelIdStr.Length - 1).Trim();//去掉最后一个,
}
string chkstr = chkModelIdStr;
Response.Redirect("default2.aspx?role=" + role + "&chkstr=" + chkstr + "");
}