62,074
社区成员
发帖
与我相关
我的任务
分享
bool ifcheck=false;
string curId="0";
foreach (RepeaterItem item in this.Repeater1.Items)
{
CheckBox cb = (CheckBox)item.FindControl("CheckBox1");
TextBox tbx = (TextBox)item.FindControl("tbxTableName");
if (cb != null)
{
if (cb.Checked)
{
curId=tbx.Text;
ifcheck=true;
break;
}
}
}
if(ifcheck)
{
Response.Redirect("SendCourseOrder.aspx?course_id=" + curId);
}
else
{
Response.Write(" <script>alert('请选择一个课程!'); </script>");
}