asp.net(c#)Êý¾ÝÀàÐ͸ñʽת»»´óÈ«
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¡¢Int32.Parse(±äÁ¿) Int32.Parse("³£Á¿")
×Ö·ûÐÍת»» תΪ32λÊý×ÖÐÍ
3¡¢ ±äÁ¿.ToString()
×Ö·ûÐÍת»» תΪ×Ö·û´®
12345.ToString("n"); //Éú³É 12,345.00
12345.ToString("C"); //Éú³É £¤12,345.00
12345.ToString("e"); //Éú³É 1.234500e+004
12345.ToString("f4"); //Éú³É 12345.0000
12345.ToString("x"); //Éú³É 3039 (16½øÖÆ)
12345.ToString("p"); //Éú³É 1,234,500.00%
4¡¢±äÁ¿.Length Êý×ÖÐÍ
È¡×Ö´®³¤¶È£º
鍣
Ïà¹ØÎĵµ£º
ASP.NET AJAXÍƳöÒ²ÓÐÒ»¶Îʱ¼äÁË£¬µ±³õÐû³ÆµÄAJAX¿Í»§¶Ë½Å±¾¿ÉÒÔÍÑÀë·þÎñÆ÷¶Ë½Å±¾£¬ÔÚÖîÈçhtml,phpµÈƽ̨ÉÏʹÓ㬵«Ïñ΢Èí²»ÉÙÆäËû²úÆ·Ò»Ñù£¬Õâ¸ö·Ê´óµÄ£¬ÐÔÄܵÍÏ£¬ºÁÎÞÒÕÊõ¸ÐµÄ¿ò¼ÜÕýÔÚ±»´ó¼ÒËùÚ¸²¡¡£Ô½À´Ô½¶àµÄÈËÏëÒªÍÑÀëÕâ¸ö¿Í»§¶Ë½Å±¾£¬ÍÑÀëAJAXÌṩµÄ¿Í»§¶Ë¿Ø¼þ£¬Óøü¾«Á¶¸ü¸ßЧµÄ¿ò¼ÜÀ´µ÷Ó÷þÎñÆ÷¶Ë·½·¨¡£ºÜÏÔÈ»£¬Ä¿ ......
ÔÚ IIS 6.0 Öв¿ÊðASP.NET MVC³ÌÐò
1¡¢°²×°ASP.NET MVC¿ò¼Ü³ÌÐò
AspNetMVC1.msi ÏÂÔصØÖ·£º
http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en
2¡¢ÉèÖÃIIS
1£© ......
C#Á¬½ÓÁ¬½ÓAccess
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwin ......
¹ØÓÚClientIDµÄʹÓÃÎÒÓöµ½Ò»ÏÂÎÊÌ⣺
»ñÈ¡ÓÉ ASP.NET Éú³ÉµÄ·þÎñÆ÷¿Ø¼þ±êʶ·û¡£
ÎÊÌâÒ»£º Óû§¿Ø¼þµÄÒ³ÃæJavaScriptÖÐÐèҪʹÓÃAsp.netµÄ¿Ø¼þID£¬³öÏÖ²»Ò»Ö¡£
ÎÊÌâ¶þ£ºÄ¸°æÒ³µÄ×ÓÒ³ÃæJavaScriptÖÐÐèҪʹÓÃAsp.netµÄ¿Ø¼þID£¬³öÏÖ²»Ò»Ö¡£
½â¾ö°ì·¨£º
document.getElementById("<% ......
ÔÚÄãµÄPage_LoadÖÐÌí¼ÓÕâÑùµÄ´úÂë:
Page.Response.Clear();
bool success = ResponseFile(Page.Request, Page.Response, "Ä¿µÄÎļþÃû³Æ", @"Ô´Îļþ·¾¶", 1024000);
if (!success)
Response.Write("ÏÂÔØÎļþ³ö´í£¡");
Page. ......