日期:2014-05-17  浏览次数:20430 次

本人菜鸟,在后台拼了一个checkbox,但是想在前台实现删除和恢复删除,请大侠赐教,急急急,在线等,解决了30分
拼的代码 public string EasyMessary()
    {
        string EasyMessary = hideEasyMessary.Value;

        string []arrMessary=EasyMessary.Split(','); 
    
        DataSet ds = nmbll.AllUseCheckboxDal(); 
     
        StringBuilder str = new StringBuilder();
        if (ds.Tables[0].Rows.Count > 0)
        {
            str.Append("<table><tr>");
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (arrMessary.Length> 0)
                {
                   
                        int count = 0;
                        for (int j = 0; j < arrMessary.Length; j++)
                        {
                            
                           if (arrMessary[j]==ds.Tables[0].Rows[i]["MeasureID"].ToString())
                          {
                               count++;
                              str.Append("<td><input type='checkbox' checked='checked' ID='check' runat='server' value=" + ds.Tables[0].Rows[i]["MeasureID"].ToString() + " />" + ds.Tables[0].Rows[i]["MeasureName"].ToString() + "</td>");
                              break;
                          }
                           
            &nbs