Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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µ¯³öģʽ¶Ô»°´°¿Ú·â×°Àà

 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /// <summary>
    /// javascriptµ¯³ö´°¿Ú·â×°Àà
    /// </summary>
    public static class JSCommon ......

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

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

»ñÈ¡ÓÉASP.NETÉú³ÉµÄ·þÎñÆ÷¿Ø¼þ±êʶ·û

 1
        private void Focus(string sDomID)
        {
            RegScript("focus", "document.getElementById(\"" + sDomID + "\").focus();");
     ......

ASP.NET¹ØÓÚÌõÐÎÂëµÄÉú³ÉÎÊÌâ¼æÍøÒ³´òÓ¡

ÌõÐÎÂëÊÇÆù½ñΪֹ×î¾­¼Ã¡¢ÊµÓõÄÒ»ÖÖ×Ô¶¯Ê¶±ð¼¼Êõ¡£ÌõÐÎÂë¼¼Êõ¾ßÓÐÒÔϼ¸¸ö·½ÃæµÄÓŵã
¡¡¡¡A£®ÊäÈëËٶȿ죺Óë¼üÅÌÊäÈëÏà±È£¬ÌõÐÎÂëÊäÈëµÄËÙ¶ÈÊǼüÅÌÊäÈëµÄ5±¶£¬²¢ÇÒÄÜʵÏÖ“¼´Ê±Êý¾ÝÊäÈ딡£
¡¡¡¡B£®¿É¿¿ÐԸߣº¼üÅÌÊäÈëÊý¾Ý³ö´íÂÊΪÈý°Ù·ÖÖ®Ò»£¬ÀûÓùâѧ×Ö·ûʶ±ð¼¼Êõ³ö´íÂÊΪÍò·ÖÖ®Ò»£¬¶ø²ÉÓÃÌõÐÎÂë¼¼ÊõÎóÂëÂʵ ......

asp,asp.net,php,jspϵÄ301תÏò´úÂë,ÕûÕ¾Öض¨Ïò

 asp,asp.net,php,jspϵÄ301תÏò´úÂë
ʹÓÃ.htaccessÎļþÀ´½øÐÐ301Öض¨Ïò¡£
Èç¹û¿Õ¼ä²»Ö§³Ö.htaccessÎļþ£¬ÄÇôÎÒÃÇ»¹¿ÉÒÔͨ¹ýphp/asp´úÂëÀ´½øÐÐ301Öض¨Ïò¡£
ΪÁ˽«ËÑË÷ÒýÇæµÄ¼Ç¼¸üе½ÏÖÔÚµÄÓòÃûÉÏÃæ,×öÁ˼¸¸ö301Öض¨ÏòµÄ¶«¶«,¸ø´ó¼Ò·ÖÏíÒ»ÏÂ.
asp 301תÏò´úÂë
ÔÚ index.asp »ò default.asp µÄ×²¿¼ÓÈëÒÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ