• net1:DateTime,Application与Session,


    原文发布时间为:2008-07-29 —— 来源于本人的百度文章 [由搬家工具导入]

    using System;
    using System.Data;
    using System.Configuration;
    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 _Default : System.Web.UI.Page
    {
        string ch = "hao";
       
        protected void Page_Load(object sender, EventArgs e)
        {
          

            Response.Write(ch);
            DateTime dt;
            dt = DateTime.Now;
            DateTime dat = Convert.ToDateTime("2006.3.12");
            Response.Write(dat.Year.GetType() + "<br>");
            Response.Write(dat.ToLongDateString() + "<br>");
       
            Response.Write("nian:" + dt.Year + "<br>" + "yue:" + dt.Month +"<br>"+ "ri:" + dt.Day);
            Label1.Text = "shij"+dat;
            Response.Write(dt.ToLongDateString()+"<br>"+dt.ToLongTimeString()+"<br>"+dt.ToShortDateString());
           
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            TextBox1.Text = ch;
            Response.Write("<br>" + ch);
        }
    }
    -----------------------------------------------------

    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 Default6 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Application.Lock();
            Application["a"] = (int)Application["a"] + 1;
            Application.UnLock();
            Response.Write(Application["a"]);
            Response.Write(Session["name"]);
        }
    }

  • 相关阅读:
    ADB 多设备中指定设备的启动
    vuex 绑定表单,多个输入框的解决办法
    vue 自动触发点击事件
    js 打印dom的所有属性
    邮件分享
    table表格 td设置固定宽度
    Echarts--Y坐标标题显示不全
    ExtJS5.0 菜鸟的第一天
    字体设置
    短信验证码+倒计时
  • 原文地址:https://www.cnblogs.com/handboy/p/7141546.html
Copyright © 2020-2023  润新知