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

130µÀasp.netÃæÊÔÌ⣬ÓÐЩ×Ô¼ºµÄÐĵúÍÀ§»ó£¨¶þ£©

69.ÏÂÃæÕâ¶Î´úÂëÊä³öʲô£¿ÎªÊ²Ã´£¿
int i=5;
int j=5;
if (object.referenceequals(i,j))
console.writeline("equal");
else
console.writeline("not equal");
´ð£º²»ÏàµÈ£¬ÒòΪ±È½ÏµÄÊǶÔÏó
70.ʲô½Ð×ösql×¢È룬ÈçºÎ·ÀÖ¹£¿Çë¾ÙÀý˵Ã÷¡£
´ð£ºÀûÓÃsql¹Ø¼ü×Ö¶ÔÍøÕ¾½øÐй¥»÷¡£¹ýÂ˹ؼü×Ö'µÈ
71.ʲôÊÇ·´É䣿
´ð£º¶¯Ì¬»ñÈ¡³ÌÐò¼¯ÐÅÏ¢
[Alex] ³ÌÐò¼¯Êµ¼ÊÉÏÊÇÍйܴúÂ룬ԪÎļþºÍ×ÊÔ´ÎļþµÄ¼¯ºÏ£¬ÔªÎļþ¾ÍÊÇÒ»¶Ñ±í£¬°üÀ¨ÁËÀàÐͶ¨Ò壬×ֶζ¨Ò壬ºÍ·½·¨¶¨Òå¡£
 ·´Éä¾ÍÊÇ·´ÉäÕâЩԪÎļþ£¬¶¯Ì¬»ñÈ¡³ÌÐò¼¯µÄÐÅÏ¢¡£
72.ÓÃsingletonÈçºÎдÉè¼Æģʽ
´ð£ºstaticÊôÐÔÀïÃænew ,¹¹Ô캯Êýprivate
[Alex]
using System;
public class Singleton
{
private static Singleton instance;
private Singleton() {}
public static Singleton Instance
{
get
{
if (instance == null)
{
instance = new Singleton();
}
return instance;
}
}
}
Òªµã£º1£©¹¹Ô캯ÊýÊÇPrivate ÐÍ 2)¶ÔÍ⹫²¼µÄ½Ó¿ÚÊÇstaticÐÍ 3)ÔÚnewÒ»¸öʵÀý֮ǰҪÅÐ¶Ï instanceÊÇ·ñΪ¿Õ
ÄÜ¿´³öÏÖÃæµÄ´úÂëÓÐÄÄЩ´íÎóÂ𣿠
public class singleton
        {
            private singleton singletonObject=new singleton();
            public static singleton GetInstance()
            {
               return singletonObject;
            }
        }
 
1)new֮ǰûÓÐÅжÏÊÇ·ñΪ¿Õ
2£©singletonObject ûÓж¨ÒåΪstatic£¬»áÓбàÒë´íÎó
73.ʲôÊÇapplication pool£¿
´ð£ºwebÓ¦Óã¬ÀàËÆthread pool£¬Ìá¸ß²¢·¢ÐÔÄÜ¡£
[alex]ÓеãÀàËÆÓÚÓ¦ÓóÌÐòÓò£¬¶¼ÊÇΪÁËÄڴ氲ȫ£¬°Ñ²»Í¬µÄÓ¦ÓóÌÐòÔÚÄÚ´æ·ÖÅäÖиôÀ뿪À´¡£
74.ʲôÊÇÐ麯Êý£¿Ê²Ã´ÊdzéÏóº¯Êý£¿
´ð£ºÐ麯Êý£ºÃ»ÓÐʵÏֵģ¬¿ÉÓÉ×ÓÀà¼Ì³Ð²¢ÖØдµÄº¯Êý¡£³éÏóº¯Êý£º¹æ¶¨Æä·ÇÐé×ÓÀà±ØÐëʵÏֵĺ¯Êý£¬±Ø


Ïà¹ØÎĵµ£º

ASP.NET


      ͨ³££¬SQL Óï¾äºÍ´æ´¢¹ý³Ì°üÀ¨ÔËÐÐʱ¼ÆËãµÄ²ÎÊý¡£Ê¹ÓòÎÊý±àдµÄ SQL Óï¾ä³Æ×÷²ÎÊý»¯ SQL Óï¾ä¡£
ʹÓà SqlDataSource ¿Ø¼þʱ£¬¿ÉÒÔÖ¸¶¨Ê¹ÓòÎÊýµÄ SQL ²éѯºÍÓï¾ä¡£Í¨¹ý¸ù¾ÝÔËÐÐʱ¼ÆËãµÄÖµ¶ÁдÊý¾Ý¿âÐÅÏ¢£¬ÕâÓÐÖúÓÚÌáÉýÊý¾Ý°ó¶¨»·¾³µÄÁé»îÐÔ¡£¿ÉÒÔ´Ó¸÷ÖÖÔ´»ñÈ¡²ÎÊýÖµ¡£ÕâЩԴ°üÀ¨ ASP.N ......

ASP.NETѧϰ±Ê¼ÇÁù ´î½¨¡°µÚÈý²¨Êéµê¡±ÏµÍ³¿ò¼Ü

Ò»°ã´î½¨Èý²ã¿ò¼ÜÏîÄ¿ÊÇÕâÑùµÄ:
1¡¢´´½¨Ò»¸ö¿ÕµÄ½â¾ö·½°¸
2¡¢´´½¨Àà¿âÏîÄ¿
3¡¢´´½¨ÍøÕ¾ÏîÄ¿
4¡¢Ìí¼ÓÏîÄ¿Ö®¼äµÄÒýÓã¬ÐèҪעÒâµÄÊDZíʾ²ã£¨ÍøÕ¾ÏîÄ¿²ã£©ÊDz»ÐèÒªÌí¼ÓÆäËü²ãÒýÓõģ¬ÒòΪÔËÐк󣬻á×Ô¶¯²úÉú¶ÔÆäËüÏîÄ¿µÄÒýÓÃ
 Èý²ã½á¹¹£º
         Êý¾Ý·ÃÎʲ㣺Ö÷ҪʵÏÖÊý ......

Asp.net ºǫ́µ÷ÓÃjs·½·¨(ת)

1. ÓÃResponse.Write·½·¨
¡¡¡¡´úÂëÈçÏ£º
Response.Write("<script type='text/javascript'>alert("XXX");</script>");
´Ë·½·¨È±ÏݾÍÊDz»Äܵ÷Óýű¾ÎļþÖеÄ×Ô¶¨ÒåµÄº¯Êý£¬Ö»Äܵ÷ÓÃÄÚ²¿º¯Êý£¬¾ßÌåµ÷ÓÃ×Ô¶¨ÒåµÄº¯ÊýÖ»ÄÜÔÚResponse.WriteдÉϺ¯Êý¶¨ Ò壬±ÈÈç
Response.Write("<script type='tex ......

ASP.NET note I

 Page_Load--Ò³Ãæ¼ÓÔØʼþ.
Page.IspostBackÅжÏÊÇ·ñµÚÒ»´Î¼ÓÔØ¡£
   ÿ´ÎÏìÓ¦·þÎñÐÅÏ¢(¼È¿Í»§ÇëÇóASP.NETÒ³Ãæ-ASPXÎļþ»òWeb·þÎñ-
ASMXÎļþ)¾Í¼ÓÔØÒ»´Î(Ö´ÐÐÒ»´ÎPage_Load)¡£
   ¼ÓÔصÄʱºò²¢²»ÊÇÿ´Î¶à±àÒëÒ»´Î´úÂëÎļþ£¬ÒòΪ£ºÃ¿Ò»´ÎÇëÇó
ASPXÎļþʱ²¢²»ÊǶàÒª½øÐÐÒ»´Î±àÒ룬¶øÊǵÚÒ»´ÎÖ´ ......

asp.net »ñÈ¡IPµÄÏà¹Ø֪ʶ

ASP.net »ñµÃ¿Í»§¶ËµÄIP£¬×î³£¼ûµÄÊÇʹÓÃÏÂÊö´úÂ룺
string user_IP = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
¶ÔÓÚÁ˽â´úÀí·þÎñÆ÷Çé¿öµÄÈË£¬ÎÒÃÇ»áÖªµÀ£¬Èç¹ûÓû§Ê¹ÓÃÁË´úÀí·þÎñÆ÷£¬ÉÏÊö´úÂë»ñµÃµÄÊÇ´úÀí·þÎñÆ÷µÄIPµØÖ·£»Èç¹ûÓû§Ê¹ÓÃÁ˶à¸ö´úÀí·þÎñÆ÷£¬ÔòÊǵ½´ï·þÎñÆ÷µÄ×îºóÒ»¸ö´úÀí· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ