asp.netÈÕÆÚʱ¼äº¯Êý¸ñʽ
//»ñÈ¡ÈÕÆÚ+ʱ¼ä
DateTime.Now.ToString(); // 2008-9-4 20:02:10
DateTime.Now.ToLocalTime().ToString(); // 2008-9-4 20:12:12
//»ñÈ¡ÈÕÆÚ
DateTime.Now.ToLongDateString().ToString(); // 2008Äê9ÔÂ4ÈÕ
DateTime.Now.ToShortDateString().ToString(); // 2008-9-4
DateTime.Now.ToString("yyyy-MM-dd"); // 2008-09-04
DateTime.Now.Date.ToString(); // 2008-9-4 0:00:00
//»ñȡʱ¼ä
DateTime.Now.ToLongTimeString().ToString(); // 20:16:16
DateTime.Now.ToShortTimeString().ToString(); // 20:16
DateTime.Now.ToString("hh:mm:ss"); // 08:05:57
DateTime.Now.TimeOfDay.ToString(); // 20:33:50.7187500
//ÆäËû
DateTime.ToFileTime().ToString(); // 128650040212500000
DateTime.Now.ToFileTimeUtc().ToString(); // 128650040772968750
DateTime.Now.ToOADate().ToString(); // 39695.8461709606
DateTime.Now.ToUniversalTime().ToString(); // 2008-9-4 12:19:14
DateTime.Now.Year.ToString(); »ñÈ¡Äê·Ý // 2008
DateTime.Now.Month.ToString(); »ñÈ¡ÔÂ·Ý // 9
DateTime.Now.DayOfWeek.ToString(); »ñÈ¡ÐÇÆÚ // Thursday
DateTime.Now.DayOfYear.ToString(); »ñÈ¡µÚ¼¸Ìì // 248
DateTime.Now.Hour.ToString(); »ñȡСʱ // 20
DateTime.Now.Minute.ToString(); »ñÈ¡·ÖÖÓ // 31
DateTime.Now.Second.ToString(); »ñÈ¡ÃëÊý // 45
//nΪһ¸öÊý,¿ÉÒÔÊýÕûÊý,Ò²¿ÉÒÔÊÇСÊý
dt.AddYears(n).ToString(); //ʱ¼ä¼ÓnÄê
dt.AddDays(n).ToString(); //¼ÓnÌì
dt.AddHours(n).ToString(); //¼ÓnСʱ
dt.AddMonths(n).ToString(); //¼Ón¸öÔÂ
dt.AddSeconds(n).ToString(); //¼ÓnÃë
dt.AddMinutes(n).ToStr
Ïà¹ØÎĵµ£º
ÓÃASP.NETÓëSQL SERVER¿ÉÊÇÔµ·Ý×îºÃÁË£¬ÉÔ´óµÄ³ÌÐòÒ»°ãµÚÒ»ÏÈ¿¼ÂǵÄÊÇSQL SERVER£¬Ö»ÊÇһЩºÜ¿¼ÂǾ¼ÃµÄ²ÅʹÓÃACCESSµÈÁË¡£ÓÃSQL SERVER£¬ÎªÁËʹÊý¾Ý¿âµÄЧÂʸüºÃ£¬Ò»°ã¶¼»á²ÅÈ¡´æ´¢¹ý³Ì£¬Òò´æ´¢¹ý³ÌÖ´ÐÐËٶȿ죬²¢ÇÒ¿ÉÒÔʵÏÖһЩ¸ß¼¶µÄ²éѯµÈ¹¦ÄÜ¡£±ÈÈç´«ÈëһЩÊý¾Ý²ÎÊý£¬µ«Ö´ÐеÄSQL¹ý³Ì¿ÉÄܲ»Í¬µÈ¡£
¡¡¡¡ÏÂÃæ¾ÍÀ´¸öÀý× ......
Ö»ÐèÔÚasp.netÒ³ÃæµÄPageÖ¸ÁîÖÐÉèÖÃMaintainScrollPositionOnPostback="true"¾Í¿ÉÒÔÇáËÉʵÏÖ¡£
MaintainScrollPositionOnPostbackÊôÐÔµÄĬÈÏֵΪfalse¡£
ÁíÍâasp.netµÄpage¶ÔÏó»¹ÓÐÒ»¸öSmartNavigatorÊôÐÔ£¬Õâ¸öÊôÐÔÎÒÒ²ÊÔ¹ý¡£¡£ºÃÏñ¶ÔÓÚcssÓÐÓ°Ïì¡£Ò³Ãæ²¼¾ÖÓеã±ä»¯¡£¡£²»ÊǺܺÃʹ ......
Asp.NetÖÐÓÐÒ»Ì×ÓëÓû§Ïà¹ØÁªµÄÊôÐÔÉèÖ㬿ÉÒÔͨ¹ýÔÚWebConfigÀïÅäÖÃÀ´Ö±½ÓʹÓã¬ËûµÄ×÷ÓÃΪ
´æ´¢ºÍʹÓÃΨһÓëÓû§¶ÔÓ¦µÄÐÅÏ¢
Õ¹ÏÖ¸öÈË»¯°æ±¾µÄWebÓ¦ÓóÌÐò
Óû§µÄΨһÉí·Ý±êʶÔÚÔٴηÃÎÊʱʶ±ðÓû§
Asp.Net ProfileÌṩµÄ¸úÓû§Ïà¹ØµÄÀàÐͶ¼ÊÇÇ¿ÀàÐÍ
Ê×ÏÈÉú³ÉÊý¾Ý¿â½Å±¾£¬Ê¹ÓÃVisual Studio 2005 ÃüÁîÌáʾ£¬ÊäÈëÃü ......
Ò»¡¢»ñÈ¡µ±Ç°ÎļþµÄ·¾¶
1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
»ñÈ¡Ä£¿éµÄÍêÕû·¾¶£¬°üÀ¨ÎļþÃû¡£
2. System.Environment.CurrentDirectory
»ñÈ¡ºÍÉèÖõ±Ç°Ä¿Â¼(¸Ã½ø³Ì´ÓÖÐÆô¶¯µÄĿ¼)µÄÍêÈ«ÏÞ¶¨Ä¿Â¼¡£ ......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
/// <summary>
/// ÉùÃ÷ίÍÐ
/// </summary>
/// <param name="name"></param>
public delegate void GreetPeopleDelegate(st ......