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

asp.net»ñÈ¡µ±Ç°Ê±¼ä

ÔÚc# / ASP.netÖÐÎÒÃÇ¿ÉÒÔͨ¹ýʹÓÃDataTimeÕâ¸öÀàÀ´»ñÈ¡µ±Ç°µÄʱ¼ä¡£Í¨¹ýµ÷ÓÃÀàÖеĸ÷ÖÖ·½·¨ÎÒÃÇ¿ÉÒÔ»ñÈ¡²»Í¬µÄʱ¼ä£ºÈ磺ÈÕÆÚ£¨2008-09-04£©¡¢Ê±¼ä£¨12£º12£º12£©¡¢ÈÕÆÚ+ʱ¼ä£¨2008-09-04 12£º11£º10£©µÈ¡£
//»ñÈ¡ÈÕÆÚ+ʱ¼ä
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();     »ñÈ


Ïà¹ØÎĵµ£º

asp.net mvc 2

Controller needs to derive from Mvc.Controller
each controller function is assiaciaed with a default view by name
controller and viewer can exchange data by viewdata
use HTML.ActionLink to add a link on html page
a url is corresponding to a action method
in view, using HTML.BeginForm() will gen ......

Asp.netѧϰ·Ïß

1¡£Ê×ÏÈÊÇ»ù±¾Ô­Àí£¬±ÈÈç˵ÊÇlife cycle£¬Êý¾Ý¿â²Ù×÷µÈ¡£
2¡£Êµ¼ÊÏîÄ¿µÄʵ¼ù£¬Ç°Ò»½×¶ÎµÄ¹¤×÷ÔÚÕâ¸ö½×¶Î¼ìÑ飬ºÃÏñ×ö¸öÍøվûÓÐÏëÏóµÄÄÇô¼òµ¥¡£
3¡£Ñо¿Êµ¼ÊµÄ°¸ÀýºÍ¿ªÔ´¿ò¼Ü£¬µ½ÕâÀï²ÅÃ÷°×£¬Ô­À´ÍøÕ¾ÕâôµÄ×öµÄ£¬ºÃÏñÊÇûÓÐÄÇôÄÑ°¡¡£
¼òµ¥µÄдд£¬¼Ç¼ÔÚʵ¼ÊÏîÄ¿ÖеĸÐÎò¡£ÓÚ2010-5-30Íí£¬¾ãÀÖ²¿¡£ ......

ASP.NET ÊÓͼ״̬

 Web ÊÇ»ùÓÚÎÞ״̬µÄhttpЭÒ飬ASP.NET ΪÁ˱£Ö¤¿Ø¼þÔÚÒ³Ãæ´«Ë͵½·þÎñÆ÷£¬ÔÙ´Ó·þÎñÆ÷·¢»Øµ½Ò³ÃæµÄʱ±£³Ö֮ǰµÄ״̬¡£
´úÂë×¼±¸£º
ÔÚaspxÒ³ÃæÉÏÌí¼ÓÒ»¸ölistbox¿Ø¼þ£¬ºÍÒ»¸öbutton·þÎñÆ÷¿Ø¼þ£º
<
asp:ListBox runat
=
"
server
"
 ID
=
"
lbViewState
"
></
asp ......

½â¾ödatalistÖе¥Ñ¡°´Å¥¿ÉÒÔ¶àÑ¡µÄÎÊÌ⣨Asp.Net£©

ÎÊÌâÃèÊö£º
Asp.NetÖÐdatalistµÈweb¿Ø¼þÀïÃ棬·Å¶à¸öµ¥Ñ¡°´Å¥µÄʱºò¿ÉÒÔͬʱ¶àÑ¡¡£
ÎÊÌâ½â¾ö£º
×îÀíÏëµÄ½â¾öÖ®µÀ£¬ÓÃjavascript£º
<script language="javascript" type="text/javascript">
function clickit() {
        var dom=document.all;
    & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ