asp.net中System.DateTime.Now.ToString()的一些用法
Asp.net中的日期处理函数
//2009年4月24日
this.TextBox6.Text = System.DateTime.Now.ToString("D");
//2009-4-24
this.TextBox7.Text = System.DateTime.Now.ToString("d");
//2009年4月24日 16:30:15
this.TextBox8.Text = System.DateTime.Now.ToString("F");
//2009年4月24日 16:30
this.TextBox9.Text = System.DateTime.Now.ToString("f");
//2009-4-24 16:30:15
this.TextBox10.Text = System.DateTime.Now.ToString("G");
//2009-4-24 16:30
this.TextBox11.Text = System.DateTime.Now.ToString("g");
//16:30:15
this.TextBox12.Text = System.DateTime.Now.ToString("T");
//16:30
this.TextBox13.Text = System.DateTime.Now.ToString("t");
//2009年4月24日 8:30:15
this.TextBox14.Text = System.DateTime.Now.ToString("U");
//2009-04-24 16:30:15Z
this.TextBox15.Text = System.DateTime.Now.ToString("u");
//4月24日
this.TextBox16.Text = System.DateTime.Now.ToString("m");
this.TextBox16.Text = System.DateTime.Now.ToString("M");
//Tue, 24 Apr 2009 16:30:15 GMT
this.TextBox17.Text = System.DateTime.Now.ToString("r");
this.TextBox17.Text = System.DateTime.Now.ToString("R");
//2009年4月
this.TextBox19.Text = System.DateTime.Now.ToString("y");
this.TextBox19.Text = System.DateTime.Now.ToString("Y");
//2009-04-24T15:52:19.1562500+08:00
this.TextBox20.Text = System.DateTime.Now.ToString("o");
this.TextBox20.Text = System.DateTime.Now.ToString("O");
//2009-04-24T16:30:15
this.TextBox18.Text = System.DateTime.Now.ToString("s");
//2009-04-24 15:52:19
this.TextBox21.Text = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
//2009年04月24 15时56分48秒
this.TextBox22.Text = System.DateTime.Now.ToString("yyyy年MM月dd HH时mm分ss秒");
转自:http://www.cnblogs.com/X-Jonney/archive/2009/07/30/1535047.html
相关文档:
Page 执行中将按照如下顺序激活事件:
Page.PreInit
Page.Init
Page.InitComplite
Page.PreLoad
Page.Load
Page.LoadComplete
Page.PreRender
Page.PreRenderComplete
如果页面从令一个页面继承,如BasePage:System.Web.UI.Page,在BasePage中做了一些扩展,如权限检查,而其他页面从BasePage继承,则BasePage和最 ......
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
'若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(Confor ......
1. DotNetNuke(ASP.NET 2.0) 个人推荐深入研究
DotNetNuke是一个Web应用框架的理想,为创建和部署的项目,如商业网站,企业内联网和外联网,在网上出版门户,并定制垂直应用软件。 方便用户-DotNetNuke旨在使用户可以更轻松地管理所有方面的项目。
下载网址:http://www.dotnetnuke.com/
2、Ludico
Ludico是C#编写的居于ASP ......
private void btnUploadPicture_Click(object sender, System.EventArgs e) { //检查上传文件的格式是否有效 if(this.UploadFile.PostedFile.ContentType.ToLower().IndexOf("image") < 0) { Response.Write("上传图片格式无效!"); return; } //生成原图 Byte[] oFileByte = new byte[this.UploadFile.PostedFile.Conte ......
asp.net 将Excel导入到Sql2005或2000的思路和步骤:
1、将Excel文件上传到服务器端
这个我不想详细讲了,网上一搜一大把的.
注意:(1在取服务器路径时一定要用this.Page.MapPath(".")而不要用 this.Page.Request.Applic ......