asp.net DateTime ʱ¼äº¯Êý
1¡¢DateTime Êý×ÖÐÍ
System.DateTime currentTime=new System.DateTime();
1.1 È¡µ±Ç°ÄêÔÂÈÕʱ·ÖÃë
currentTime=System.DateTime.Now;
1.2 È¡µ±Ç°Äê
int Äê=currentTime.Year;
1.3 È¡µ±Ç°ÔÂ
int ÔÂ=currentTime.Month;
1.4 È¡µ±Ç°ÈÕ
int ÈÕ=currentTime.Day;
1.5 È¡µ±Ç°Ê±
int ʱ=currentTime.Hour;
1.6 È¡µ±Ç°·Ö
int ·Ö=currentTime.Minute;
1.7 È¡µ±Ç°Ãë
int Ãë=currentTime.Second;
1.8 È¡µ±Ç°ºÁÃë
int ºÁÃë=currentTime.Millisecond;
£¨±äÁ¿¿ÉÓÃÖÐÎÄ£©
2.
dateObj = new Date()£»
dateObj.getYear();
dateObj.getMonth();
dateObj.getDate();
dateObj.getHour();
dateObj.getMinutes();
dateObj.getSeconds();
dateObj.getMilliseconds();
3.
DateTime now = new DateTime();
now = System.DateTime.Now;
String dateStr = now.ToString("yyyyÄêMMÔÂddÈÕ HH:mm:ss");
³öÀ´µÄ¸ñʽÊÇÈç“2005Äê09ÔÂ01ÈÕ 12£º00£º00”
4.ToFileTimeUtc().ToString();//127756704859912816
Label4.Text = dt.ToLocalTime().ToString();//2005-11-5 21:21:25
Labe
Ïà¹ØÎĵµ£º
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 ......
ÔÚASP.NETÖÐÎÒÃǾ³£ÐèÒªÊä³öһЩJS½Å±¾£¬±ÈÈ絯³öÒ»¸ö¾¯¸æ´°¿Ú£¬·µ»Øµ½ÀúÊ·Ò³ÃæµÈJS¹¦ÄÜ£¬ÎÒ¿´µ½ÍøÉϺöàÕâ·½ÃæµÄ´úÂ룬ÒÔÏ´úÂëÊÇÆäÖÐÖ®Ò»¡£
Õû¸ö³ÌÐòµÄ´úÂëÈçÏ£º
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
/// &l ......
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 ......
¸Õ¸Õ½Ó´¥ÍøÒ³¿ª·¢£¬²»¹ýÓöµ½URR²ÎÊý´«µÝ´íÎóµÄÎÊÌ⣬Á½¸öÒ³Ãæ½øÐÐÐÅÏ¢½»»¥Ê±¿ÉÒÔÓÃurl½øÐд«µÝ£¬µ«ÊÇÈç¹û´«µÝÐÅÏ¢µÄ±àÂë¸ñʽ²»ÊÇUTF-8£¨»òÕß²»ÊÇÉèÖõÄĬÈϸñʽ£©URL´«µÝʱ»á³öÏÖÂÒÂë¡£
±ÈÈçÄã´«È뺺×Ö£¬»òÕß´«Èë"§”µÈÆäËû±àÂë¸ñʽµÄ×Ö·û´®ÏµÍ³½âÎöºóµÄurlΪÂÒÂë¡£¾¹ýÔÚÍøÉϵIJéÕÒ¾õµÃÒ»ÏÂÁ½ÖÖ·½Ê½±È½ÏºÃ£º
1 ......
MD5µÄÈ«³ÆÊÇMessage-Digest Algorithm 5£¨ÐÅÏ¢-ÕªÒªËã·¨£©£¬ÔÚ90Äê´ú³õÓÉMit Laboratory for Computer ScienceºÍRsa data security incµÄRonald l. rivest¿ª·¢³öÀ´£¬¾md2¡¢md3ºÍmd4·¢Õ¹¶øÀ´¡£ËüµÄ×÷ÓÃÊÇÈôóÈÝÁ¿ÐÅÏ¢ÔÚÓÃÊý×ÖÇ©ÃûÈí¼þÇ©Êð˽ÈËÃܳ×ǰ±»"ѹËõ"³ÉÒ»ÖÖ±£Ãܵĸñʽ£¨¾ÍÊǰÑÒ»¸öÈÎÒⳤ¶ÈµÄ×Ö½Ú´®±ä»»³ÉÒ»¶¨³¤µÄ´óÕ ......