zoukankan      html  css  js  c++  java
  • 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"]);
        }
    }

  • 相关阅读:
    Nagios显示器mysql定从库: libmysqlclient.so.18: cannot open shared object file: No such
    UVA 11402
    Oracle 11g 的PL/SQL函数结果缓存
    最大公约数(Greatest Common Divisor)
    计时器 Timer
    ArcGIS Engine 捕捉
    AE+C# 图层中增加相应属性标注
    C# ComboBox自动完成功能的示例
    Visual Assist的破解与安装
    GitHub的代码托管和使用方法
  • 原文地址:https://www.cnblogs.com/handboy/p/7141546.html
Copyright © 2011-2022 走看看