net1:DateTime,Application与Session,

Posted 杰的记事本——javascript.shop

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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"]);
    }
}




















































以上是关于net1:DateTime,Application与Session,的主要内容,如果未能解决你的问题,请参考以下文章

VB.Net1.1的报表查看器控件

ADO.Net1

Windows Server 2008 是不是支持 .net 1.1

FileSystemWatcher .Net 3.5

kafka confluent .NET 1.8.2 如何在消费者配置中覆盖 max.poll.interval.ms?

Spring rest xml dateTime 格式