test7.aspx.cs

来自「互联网程序设计的课程」· CS 代码 · 共 56 行

CS
56
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class backup_test7 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        TextBox1.Text = Request.QueryString  ["ab"];
        Application["count"] = Convert.ToInt32(Application["count"]) + 1;
        Label2.Text = Application["count"].ToString();
    }

    protected void Button1_Click1(object sender, EventArgs e)
    {
        Calendar1.Visible = true;
    }
    protected void Calendar1_SelectionChanged(object sender, EventArgs e)
    {
        TextBox2.Text = Calendar1.SelectedDate.ToShortDateString(); 
        Calendar1 .Visible =false ;
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
         Panel1.Visible = true;
     
    }




    protected void Button3_Click(object sender, EventArgs e)
    {
        int x = 0;
        string[] job = new String[7];
     for(int i = 0; i < 7;i++)
     {
         if (CheckBoxList1.Items[i].Selected)
             job[i] = CheckBoxList1.Items[i].Text;
         else job[i] = "";
        }
       
        Application["j"] = job;
        Response.Redirect("test8.aspx" );
    }
   
 
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?