项目学习中的代码

Posted on 2006-12-22 15:20  灰色_軌迹  阅读(234)  评论(1编辑  收藏  举报

try语句抛出异常语句

try
    {
    }
catch (Exception ex)
    {
    this.Response.Output.Write("<script>alter('系统错误:" + ex.Message + "') </script>");
 
    }
截取1,2,3,4通过“,”来截取
得到classSpan[]数组。
string[] classSpan = aRow.ClassSpan.Split(new char[] { ',' });
      //System.Text.RegularExpressions.Regex.Split(lblSpan.Text, System.Text.RegularExpressions.Regex.Escape(","));

ddlPracticeBase.Items.Clear();
                    ddlPracticeBase.DataBind();
                    ddlPracticeBase.Items.FindByValue(aRow.BaseID).Selected = true;

 

  string[] Class = System.Text.RegularExpressions.Regex.Split(Classes, System.Text.RegularExpressions.Regex.Escape(","));

ddlDay.Items.FindByValue(Convert.ToString(aRow.DayOfWeek)).Selected = true;
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue("中国"));\

 
DSCourseExperimentForLab.V_LabDataTable V_aTable =
            aLabMgr.GetCenterLabByDepartmentID(ddlSchools.SelectedValue);
    DSCourseExperimentForLab.V_LabRow V_aRow = null;
    if (V_aTable.Rows.Count > 0)
    {
        V_aRow = (DSCourseExperimentForLab.V_LabRow)V_aTable.Rows[0];
        ddlCenterLab.SelectedValue = V_aRow.ParentID;
    }

Copyright © 2024 灰色_軌迹
Powered by .NET 9.0 on Kubernetes