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

asp.net×Ô¶¯Ö´ÐÐÈÎÎñ

ÔÚ¸´ÔÓµÄÒµÎñÓ¦ÓóÌÐòÖУ¬ÓÐʱºò»áÒªÇóÒ»¸ö»òÕ߶à¸öÈÎÎñÔÚÒ»¶¨µÄʱ¼ä»òÕßÒ»¶¨µÄʱ¼ä¼ä¸ôÄڼƻ®½øÐУ¬±ÈÈ綨ʱ±¸·Ý»òͬ²½Êý¾Ý¿â£¬¶¨Ê±·¢Ë͵ç×ÓÓʼþ£¬¶¨ÆÚ´¦ÀíÓû§×´Ì¬ÐÅÏ¢£¬Ö§¸¶ÏµÍ³Öж¨ÆÚͬ²½Òì³£Õ˵¥µÈµÈ£¬ÎÒÃdzÆ֮Ϊ¼Æ»®ÈÎÎñ¡£ÊµÏּƻ®ÈÎÎñµÄ·½·¨Ò²Óкܶ࣬¿ÉÒÔ²ÉÓÃSQLAgentÖ´Ðд洢¹ý³Ì£¬²ÉÓÃWindowsÈÎÎñµ÷¶È³ÌÐòÀ´ÊµÏÖ£¬Ò²¿ÉÒÔʹÓÃWindows·þÎñÀ´Íê³ÉÎÒÃǵļƻ®ÈÎÎñ£¬ÕâЩ·½·¨¶¼ÊDz»´íµÄ½â¾ö·½°¸¡£µ«ÊÇ£¬ÒÔÉÏÕâЩ¶¼ÐèÒªÓзþÎñÆ÷µÄȨÏÞ²ÅÄܽøÐУ¬¶ø¶ÔÓÚÐéÄâÖ÷»ú¿Í»§Ê¹ÓõÄWebÓ¦ÓóÌÐòÀ´Ëµ£¬ÕâЩ·½·¨ÊµÏÖÆðÀ´²¢²»ÊǺܼòµ¥µÄ£¬Ö÷»ú·þÎñÌṩÉÌ»òÕß²»ÄÜÖ±½ÓÌṩÕâÑùµÄ·þÎñ£¬»òÕßÐèÒªÄãÖ§¸¶Ðí¶à¶îÍâµÄ·ÑÓᣠ¿´¹ýһЩÕâ·½ÃæµÄÎÄÕ£¬·¢ÏÖÓÐÒ»¸ö¹²Í¬µÄȱµã£ºIISÔËÐе½Ò»¶¨Ê±ÆÚ£¬¼Æ»®ÈÎÎñ¾ÍÍ£Ö¹ÁË¡£²éÕÒÔ­Òò·¢ÏÖÊÇIISµÄÓ¦ÓóÌÐò³Ø¶¨ÆÚ»ØÊÕµ¼Ö¼ƻ®ÈÎÎñÍ£Ö¹¡£±¾ÎĵÄÕâ¸ö·½·¨¿ÉÒÔ½â¾öÓ¦ÓóÌÐò³Ø»ØÊÕÎÊÌâ¡£
Global.asax.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Timers;
using System.Net;
using System.IO;
using System.Text;
using System.Threading;
namespace qumiao.com
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            //¶¨Ò嶨ʱÆ÷ 
            System.Timers.Timer myTimer = new System.Timers.Timer(5000);
            myTimer.Elapsed += new ElapsedEventHandler(myTimer_Elapsed);
            myTimer.Enabled = true;
        


Ïà¹ØÎĵµ£º

asp.netʱ¼ä¸ñʽ´óÈ«

DateTime dt = DateTime.Now;
// Label1.Text = dt.ToString();//2005-11-5 13:21:25
// Label2.Text = dt.ToFileTime().ToString();//127756416859912816
// Label3.Text = dt.ToFileTimeUtc().ToString();//127756704859912816
// Label4.Text = dt.ToLocalTime().ToString();//2005-11-5 21:21:25
// Label5.Text = ......

ZZʹÓÃSQL Server´æ´¢ASP.NET Session±äÁ¿

´´½¨ºÍÅäÖÃASP.NET Session״̬Êý¾Ý¿â
ÔÚ»ùÓÚNLB£¨ÍøÂ縺ÔØƽºâ£©»·¾³ÏµÄASP.NET WebÓ¦ÓóÌÐò¿ª·¢£¬ÎÒÃÇÐèÒª½«Session´æ´¢ÔÚÊý¾Ý¿âÖ驶à¸öWebÓ¦ÓóÌÐòµ÷Óã¬ÒÔÏÂΪÅäÖ÷½·¨¼°×¢ÒâÊÂÏî¡£
1.´´½¨ÓÃÓÚ´æ´¢ASP.NET SessionµÄÊý¾Ý¿â£¨Ô¶³Ì¡¢±¾µØ½Ô¿É£¬Ê¹ÓÃÊý¾Ý¿âÓû§Éí·ÝÈÏÖ¤£©
ÔÚWindows\Microsoft.NET\Framework/V2.0.507 ......

asp.net»ñÈ¡´«ÖµgetºÍpostÇëÇó

//postÇëÇó
string name = Request["name"].toString();
string name =Request.Form.Get("name").toString();
//getÇëÇó
string name = Request.QueryString["name"].toString();
µ«ÎÒ·¢ÏÖ ÎÞÂÛÊÇ·ñÊÇpostÓëget´«Öµ¶¼¿ÉÓÃ
string name = Request["name"].toString();

±íµ¥Ìá½»ÖÐgetºÍpost·½Ê½µÄÇø±ð¹éÄ ......

asp.netСÊýµãËÄÉáÎåÈëµÄ·½·¨

1.Ö»ÒªÇó±£ÁôNλ²»ËÄÉá5Èë
¡¡¡¡float f = 0.55555f£»int i =£¨int£©£¨f * 100£©£»f = £¨float£©£¨i*1.0£©/100£»
¡¡¡¡2.±£ÁôN룬ËÄÉáÎåÈë .
¡¡¡¡decimal d= decimal.Round£¨decimal.Parse£¨"0.55555"£©£¬2£©£»
¡¡¡¡3.±£ÁôNλËÄÉáÎåÈë
¡¡¡¡Math.Round£¨0.55555£¬2£©
¡¡¡¡4£¬±£ÁôNλËÄÉáÎåÈë
¡¡¡¡double dbdata = 0.5 ......

ASP.NET»·¾³µÄÅäÖÃ

½ñÌìÓÃÁË2¸öСʱµÄʱ¼äÀ´ÅäASP.NETµÄ»·¾³£¬ÓÐЩÈË¿ÉÄÜ»áÎÊ£¬ÎªÊ²Ã´ÐèÒªÕâô¾Ã£¬´ð°¸ºÜ¼òµ¥£¬ÒòΪÎÒµÄϵͳÊÇXPÉî¶ÈµÄ~ ËùÒÔ°²×°IISºÜ·Ñ¾¢£¬½ÓÏÂÀ´ÎÒÃèÊöÏÂÎÒÔõô°²×°µÄ¡£
Ç°Ì᣺
1£©ÒѾ­°²×°ÁËVS2008£¬Õâ¸ö³ÌÐòÀïÃæÒѾ­´øÁË.NETµÄFramwork
²½Ö裨һ¶¨Òª¿´ÍêÎÒдµÄÔÙȥŪ£¡£¡£¡£©£º
1£©ÏÖÔÚµÄÈÎÎñÊÇÈ¥ÍøÉÏÏÂÔØÒ»¸öIIS5.Xµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ