大家给看一下啥地方限制名称的?代码如下:
  protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        Label label = (Label) e.Item.FindControl("lblFilePath");
        Button button = (Button) e.Item.FindControl("btnUp");
        if (label != null)
        {
            this.Session["Session_UpLoadRightFlg"] = "1";
            string commandName = e.CommandName;
            if (commandName != null)
            {
                if (!(commandName == "LookPath"))
                {
                    string text;
                    string str2;
                    if (commandName == "UpFiles")
                    {
                        text = e.Item.Cells[0].Text;
                        str2 = e.CommandArgument.ToString();
                        this.SaveUpFilesToDataBase(text, str2, e.Item.Cells[2].Text, "2");
                        this.BindDataGrid();
                        label.Text = "成功上传";
                        button.Enabled = false;
                    }
                    else if (commandName == "UpOneFile")
                    {
                        text = e.Item.Cells[0].Text;
                        str2 = e.CommandArgument.ToString();
                        this.UpdateOneFileNew(text, str2, e.Item.Cells[2].Text, "1");
                        this.BindDataGrid();
                    }
                    else if (commandName == "del")
                    {
                        string script = "<script>var t=window.showModalDialog('DeleteFile.aspx?case=" + e.CommandArgument.ToString() + "','','dialogHeight=200px;dialogWidth=400px;center=yes;resizable=no;status=no;scroll=yes;help=no'); if(t==true)window.location.reload();</script>";
                        this.Page.RegisterStartupScript("", script);
                    }
                    else if (commandName == "Relation")
                    {
                        string str4 = "<script>var t=window.showModalDialog('../../DesktopModules/RelationFlowCase/RelationFlowCase.aspx?CASENO=" + e.CommandArgument.ToString().Split(new char[] { '|' })[0] + "&MATERIALID=" + e.CommandArgument.ToString().Split(new char[] { '|' })[1] + "&FLG=1','','dialogHeight=600px;dialogWidth=800px;center=yes;resizable=yes;status=no;scroll=yes;help=no'); if(t==true)window.location.reload();</script>";
                        this.Page.RegisterStartupScript("", str4);
                    }
                }
                else
                {
                    label.Text = Path.GetFileName(this.txtFilePath.Value);
                    button.Enabled = true;
                }
            }
        }
    } protected void BindDataGrid()
    {
        this.lblgrouphint.Text = "<font color=blue>批量上传步骤:1、<font color=orange>\"批量上传\"</font>&nbsp2、<font color=orange>\"浏览\"</font>&nbsp3、<font color=orange>\"上传\"</font>&nbsp4、<font color=orange>\"返回\"</font>&nbsp5、<font color=orange>\"刷新列表\"</font></font>";
        this.VsFileType = ConfigurationManager.AppSettings["ftpFileType"];
        this.VsCaseNo = base.Request.QueryString["CaseNo"];
        if ((base.Request["ActiveID"] != null) && (base.Request.QueryString["ActiveID"].ToString().Length > 0))
        {
            this.VsActiveID = base.Request.QueryString["ActiveID"];
        }
        else
        {
            DBAccess access = new DBAccess();
            string str = "select 流程ID from LANDFLOWGLOB where 案件编号='" + this.VsCaseNo + "'";
            string str2 = access.GetFirstColumn(str).ToString();
            str = "select 活动ID from FLOWNODE where 流程ID=" + str2 + " and 节点类型=1";
            this.VsActiveID = access.GetFirstColumn(str).ToString();
        }
        this.VsUpFileType = base.Request.QueryString["UpFileType"];
        if ((this.VsCaseNo == null) || (this.VsCaseNo == ""))
        {
            throw new ArgumentNullException("CaseNo");
        }
        if ((this.VsActiveID == null) || (this.VsActiveID == ""))
        {
            throw new ArgumentNullException("ActiveID");
        }
        if ((this.VsCaseNo == null) || (this.VsCaseNo == ""))
        {
            throw new ArgumentNullException("UpFileType");
        }
        string strConnection = ConfigurationManager.AppSettings["connecttingstring"].ToString();
        string strDatabaseType = ConfigurationManager.AppSettings["DataServerType"].ToString();
        DBAccess access2 = new DBAccess(strConnection, strDatabaseType);
        string strSql = "select * from CASEMATERIALLIST where CASENO='" + this.VsCaseNo + "' and SIGNINFLAG='1'";
        if (this.VsUpFileType.ToUpper() == "ONFLOW")
        {
            strSql = strSql + " and UPMATERIALTYPE='流程中上传'";
        }
        if (this.IsZH_CASEMATERIALLIST_Table())
        {
            strSql = strSql + " and DELETEFLAG=0";
        }
        string str6 = strSql;
        strSql = str6 + " and (ActiveID like '" + this.VsActiveID + ",%' or ActiveID like '%," + this.VsActiveID + ",%' or ActiveID='" + this.VsActiveID + "' or ActiveID like '%," + this.VsActiveID + ",')";
        DataSet dataSet = access2.GetDataSet(strSql);
        this.DataGrid1.DataSource = dataSet.Tables[0].DefaultView;
        this.DataGrid1.DataBind();
    }