Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

asp.net·µ»Ø¼òµ¥Êý×é

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½Å±¾µÄÀà

ÔÚASP.NETÖÐÎÒÃǾ­³£ÐèÒªÊä³öһЩJS½Å±¾£¬±ÈÈ絯³öÒ»¸ö¾¯¸æ´°¿Ú£¬·µ»Øµ½ÀúÊ·Ò³ÃæµÈJS¹¦ÄÜ£¬ÎÒ¿´µ½ÍøÉϺöàÕâ·½ÃæµÄ´úÂ룬ÒÔÏ´úÂëÊÇÆäÖÐÖ®Ò»¡£
Õû¸ö³ÌÐòµÄ´úÂëÈçÏ£º
¸´ÖÆ´úÂë ´úÂëÈçÏÂ:
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
/// &l ......

ASP.NET ÉÏ´«Í¼Æ¬²¢Éú³ÉËõÂÔͼ

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 URL ÏÔʾÂÒÂë ½â¾ö·½·¨

¸Õ¸Õ½Ó´¥ÍøÒ³¿ª·¢£¬²»¹ýÓöµ½URR²ÎÊý´«µÝ´íÎóµÄÎÊÌ⣬Á½¸öÒ³Ãæ½øÐÐÐÅÏ¢½»»¥Ê±¿ÉÒÔÓÃurl½øÐд«µÝ£¬µ«ÊÇÈç¹û´«µÝÐÅÏ¢µÄ±àÂë¸ñʽ²»ÊÇUTF-8£¨»òÕß²»ÊÇÉèÖõÄĬÈϸñʽ£©URL´«µÝʱ»á³öÏÖÂÒÂë¡£
±ÈÈçÄã´«È뺺×Ö£¬»òÕß´«Èë"§”µÈÆäËû±àÂë¸ñʽµÄ×Ö·û´®ÏµÍ³½âÎöºóµÄurlΪÂÒÂë¡£¾­¹ýÔÚÍøÉϵIJéÕÒ¾õµÃÒ»ÏÂÁ½ÖÖ·½Ê½±È½ÏºÃ£º
1 ......

ASP.NETÖÐMD5ºÍSHA1¼ÓÃܵļ¸ÖÖ·½·¨

MD5µÄÈ«³ÆÊÇMessage-Digest Algorithm 5£¨ÐÅÏ¢-ÕªÒªËã·¨£©£¬ÔÚ90Äê´ú³õÓÉMit Laboratory for Computer ScienceºÍRsa data security incµÄRonald l. rivest¿ª·¢³öÀ´£¬¾­md2¡¢md3ºÍmd4·¢Õ¹¶øÀ´¡£ËüµÄ×÷ÓÃÊÇÈôóÈÝÁ¿ÐÅÏ¢ÔÚÓÃÊý×ÖÇ©ÃûÈí¼þÇ©Êð˽ÈËÃܳ×ǰ±»"ѹËõ"³ÉÒ»ÖÖ±£Ãܵĸñʽ£¨¾ÍÊǰÑÒ»¸öÈÎÒⳤ¶ÈµÄ×Ö½Ú´®±ä»»³ÉÒ»¶¨³¤µÄ´óÕ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ