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

Asp.netÈÕÆÚ×Ö·û´®¸ñʽ»¯ÏÔʾ

Asp.netÈÕÆÚ×Ö·û´®¸ñʽ»¯ÏÔʾ--DateTime.ToString()Ó÷¨Ïê½â
ÎÒÃǾ­³£»áÓöµ½¶Ôʱ¼ä½øÐÐת»»,´ïµ½²»Í¬µÄÏÔʾЧ¹û£¬Ä¬ÈϸñʽΪ:2006-6-6 14:33:34
Èç¹ûÒª»»³É³É200606,06-2006,2006-6-6»ò¸ü¶àµÄ¸ñʽ¸ÃÔõô°ìÄØ£¿
ÕâÀォҪÓõ½:DateTime.ToStringµÄ·½·¨(String, IFormatProvider)
ʾÀý£º
using System;
using System.Globalization;
String format="D";
DateTime date=DataTime.Now;
Response.Write(date.ToString(format, DateTimeFormatInfo.InvariantInfo));
½á¹ûÊä³ö
Thursday, June 16, 2006
ÔÚÕâÀïÁгöÁ˲ÎÊýformat¸ñʽÏêϸÓ÷¨
=======================
¸ñʽ×Ö·û ¹ØÁªÊôÐÔ/˵Ã÷
d ShortDatePattern
D LongDatePattern
f ÍêÕûÈÕÆÚºÍʱ¼ä£¨³¤ÈÕÆںͶÌʱ¼ä£©
F FullDateTimePattern£¨³¤ÈÕÆںͳ¤Ê±¼ä£©
g ³£¹æ£¨¶ÌÈÕÆںͶÌʱ¼ä£©
G ³£¹æ£¨¶ÌÈÕÆںͳ¤Ê±¼ä£©
m¡¢M MonthDayPattern
r¡¢R RFC1123Pattern
s ʹÓõ±µØʱ¼äµÄ SortableDateTimePattern£¨»ùÓÚ ISO 8601£©
t ShortTimePattern
T LongTimePattern
u UniversalSortableDateTimePattern ÓÃÓÚÏÔʾͨÓÃʱ¼äµÄ¸ñʽ
U ʹÓÃͨÓÃʱ¼äµÄÍêÕûÈÕÆÚºÍʱ¼ä£¨³¤ÈÕÆںͳ¤Ê±¼ä£©
y¡¢Y YearMonthPattern
ϱíÁгöÁ˿ɱ»ºÏ²¢ÒÔ¹¹Ôì×Ô¶¨ÒåģʽµÄģʽ
========================================
ÕâЩģʽÊÇÇø·Ö´óСдµÄ£»ÀýÈ磬ʶ±ð“MM”£¬µ«²»Ê¶±ð“mm”¡£Èç¹û×Ô¶¨Òåģʽ°üº¬¿Õ°××Ö·û»òÓõ¥ÒýºÅÀ¨ÆðÀ´µÄ×Ö·û£¬ÔòÊä³ö×Ö·û´®Ò³Ò²½«°üº¬ÕâЩ×Ö·û¡£Î´¶¨ÒåΪ¸ñʽģʽµÄÒ»²¿·Ö»ò䶨ÒåΪ¸ñʽ×Ö·ûµÄ×Ö·û°´ÆäÔ­Ò帴ÖÆ¡£
¸ñʽģʽ ˵Ã÷ £º
d ÔÂÖеÄijһÌ졣һλÊýµÄÈÕÆÚûÓÐÇ°µ¼Áã¡£
dd ÔÂÖеÄijһÌ졣һλÊýµÄÈÕÆÚÓÐÒ»¸öÇ°µ¼Áã¡£
ddd ÖÜÖÐijÌìµÄËõдÃû³Æ£¬ÔÚ AbbreviatedDayNames Öж¨Òå¡£
dddd ÖÜÖÐijÌìµÄÍêÕûÃû³Æ£¬ÔÚ DayNames Öж¨Òå¡£
M Ô·ÝÊý×Ö¡£Ò»Î»ÊýµÄÔ·ÝûÓÐÇ°µ¼Áã¡£
MM Ô·ÝÊý×Ö¡£Ò»Î»ÊýµÄÔ·ÝÓÐÒ»¸öÇ°µ¼Áã¡£
MMM Ô·ݵÄËõдÃû³Æ£¬ÔÚ AbbreviatedMonthNames Öж¨Òå¡£
MMMM Ô·ݵÄÍêÕûÃû³Æ£¬ÔÚ MonthNames Öж¨Òå¡£
y ²»°üº¬¼ÍÔªµÄÄê·Ý¡£Èç¹û²»°üº¬¼ÍÔªµÄÄê·ÝСÓÚ 10£¬ÔòÏÔʾ²»¾ßÓÐÇ°µ¼ÁãµÄÄê·Ý¡£
yy ²»°üº¬¼ÍÔªµÄÄê·Ý¡£Èç¹û²»°üº¬¼ÍÔªµÄÄê·ÝСÓÚ 10£¬ÔòÏÔʾ¾ßÓÐÇ°µ¼ÁãµÄÄê·Ý¡£
yyyy °üÀ¨¼ÍÔªµÄËÄλÊýµÄÄê·Ý¡£
gg ʱÆÚ»ò¼ÍÔª¡£Èç¹ûÒªÉèÖøñʽµÄÈÕÆÚ²»¾ßÓйØÁªµÄʱÆÚ»ò¼ÍÔª×Ö·û´®£¬ÔòºöÂÔ¸Ãģʽ¡£


Ïà¹ØÎĵµ£º

ASP.NET LINQ _1

 Ê²Ã´ÊÇLINQ?
       LINQÊÇÓïÑÔ¼¯³É²éѯ(Language Integrated Query)µÄ¼ò³Æ£¬ÊÇVisual Studio 2008 ºÍ.NET Framework 3.5 °æÖÐÒ»Ïî,Í»ÆÆÐԵĴ´Ð£¬ËüÔÚ¶ÔÏóÁìÓòºÍÊý¾ÝÁìÓòÖ®¼ä¼ÜÆðÁËÒ»×ùÇÅÁº.
       Ò»¸ö¼òµ¥LINQ²éѯ£º
    &n ......

ASP.NET MVC ÈëÃÅ

ÔÚASP.NET MVC beta·¢²¼Ö®Ç°£¬M$¾ÍÐû²¼Ö§³Ö¿ªÔ´µÄJS¿ò¼ÜjQuery£¬È»ºóASP.NET MVC beta·¢²¼ºó£¬Ä㽨Á¢Ò»¸öASP.NET MVC betaµÄÏîÄ¿ºó£¬Äã¿ÉÒÔÔÚÏîÄ¿µÄscriptsĿ¼ÏÂÕÒµ½ASP.NET AJAXºÍjQueryµÄJS¡£·´ÕýÎÒÊDZȽÏϲ»¶jQueryµÄ£¬ËùÒÔ¶ÔÓÚM$´Ë¾Ù»¹ÊÇͦÐÀοµÄ¡£
·Ï»°²»¶à˵£¬ÎÒÃÇʹÓÃAJAXÀ´ÊµÏÖ·¢±íÆÀÂ۵ŦÄÜ°É¡£ÏÈÀ´¿´¿´ÔõÑùÊ¹Ó ......

ÔÚASP.NETÖÐʹÓÃGlobal.asaxÎļþ

   Global.asax Îļþ£¬ÓÐʱºò½Ð×ö ASP.NET Ó¦ÓóÌÐòÎļþ£¬ÌṩÁËÒ»ÖÖÔÚÒ»¸öÖÐÐÄλÖÃÏìÓ¦Ó¦ÓóÌÐò¼¶»òÄ£¿é¼¶Ê¼þµÄ·½·¨¡£Äã¿ÉÒÔʹÓÃÕâ¸öÎļþʵÏÖÓ¦ÓóÌÐò°²È«ÐÔÒÔ¼°ÆäËüһЩÈÎÎñ¡£ÏÂÃæÈÃÎÒÃÇÏêϸ¿´Ò»ÏÂÈçºÎÔÚÓ¦ÓóÌÐò¿ª·¢¹¤×÷ÖÐʹÓÃÕâ¸öÎļþ¡£
    ¸ÅÊö
    Global.asax λÓÚÓ¦Óà ......

ASP.NETÖÐÖ´ÐÐURLÖØд

 
¿ÉÒÔʹÓà ISAPI ɸѡÆ÷ÔÚ IIS Web ·þÎñÆ÷¼¶±ðʵÏÖ URL ÖØд£¬Ò²¿ÉÒÔʹÓà HTTP Ä£¿é»ò HTTP ´¦Àí³ÌÐòÔÚ
ASP.NET ¼¶±ðʵÏÖ URL ÖØд¡£±¾ÎÄÖصã½éÉÜÈçºÎʹÓà ASP.NET ʵÏÖ URL ÖØд£¬Òò´ËÎÒÃǽ«²»¶ÔʹÓà ISAPI ɸѡÆ÷ʵÏÖ
URL ÖØдµÄϸ½Ú½øÐÐÉîÈë̽ÌÖ¡£µ«ÊÇ£¬ÓдóÁ¿µÄµÚÈý·½ ISAPI ɸѡÆ÷¿ÉÓÃÓÚ URL ÖØд£¬ÀýÈ磺 ......

ÔÚasp.netÖлسµ´¥·¢Ö¸¶¨°´Å¥µÄʼþ

½ñÌìÔÚ¿ª·¢ÖУ¬Óöµ½ÁËÒ»¸öÎÊÌ⣺
      ÔÚHeaderÖÐÓÐÒ»¸öËÑË÷ÊäÈë¿ò£¬ËÑË÷°´Å¥ÊÇButton¿Ø¼þ£¬ÔÚ“×ÊѶÎÄÕÂËÑË÷”Óû§×Ô¶¨Òå¿Ø¼þÖÐÒ²Óõ½ÁËButton¿Ø¼þ¡£
      ½«½¹µãÍ£ÔÚ“×ÊѶ±êÌâ»òÄÚÈÝ”ÊäÈë¿òÖУ¬»Ø³µ£¬µ«ÊÇÏàÓ¦µÄÊÇHeaderÖÐÊäÈë¿òÄÚÈÝ¡£
Ô­ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ