示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("name");

            //dt.Rows.Add("ssssss");
            //dt.Rows.Add("ssssss");//取消这一行测试空模板项

            ServerControl1.DataSource = dt;
            ServerControl1.DataBind();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         foreach (string day in days)
         {
             ServerControl1 sc = new ServerControl1();
             if (day == DateTime.Now.DayOfWeek.ToString())
             {
                 sc.ForeColor      = Color.Red;
                 sc.Font.Underline = true;
             }
             sc.Text      = day + "<br /><br />";
             sc.Font.Size = 16;
             sc.Font.Bold = true;
             UserContent.Controls.Add(sc);
         }
     }
 }
示例#3
0
 /// <summary>
 /// Name:Page_Load
 /// Description:Set Focus
 /// Author:Monal Shah
 /// Created Date:2010/11/9
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     ServerControl1.Focus();
 }