asp.netÔÚiisÖÖ²¿ÊðÓöµ½µÄÎÊÌâ
ÎÊÌâ1£º
“/dsfsd”Ó¦ÓóÌÐòÖеķþÎñÆ÷´íÎó¡£
佫¶ÔÏóÒýÓÃÉèÖõ½¶ÔÏóµÄʵÀý¡£
˵Ã÷: Ö´Ðе±Ç° Web ÇëÇóÆڼ䣬³öÏÖδ´¦ÀíµÄÒì³£¡£Çë¼ì²é¶ÑÕ»¸ú×ÙÐÅÏ¢£¬ÒÔÁ˽âÓйظôíÎóÒÔ¼°´úÂëÖе¼Ö´íÎóµÄ³ö´¦µÄÏêϸÐÅÏ¢¡£
Òì³£ÏêϸÐÅÏ¢: System.NullReferenceException: 佫¶ÔÏóÒýÓÃÉèÖõ½¶ÔÏóµÄʵÀý¡£
Ô´´íÎó:
Ö´Ðе±Ç° Web ÇëÇóÆÚ¼äÉú³ÉÁËδ´¦ÀíµÄÒì³£¡£¿ÉÒÔʹÓÃÏÂÃæµÄÒì³£¶ÑÕ»¸ú×ÙÐÅϢȷ¶¨ÓйØÒì³£ÔÒòºÍ·¢ÉúλÖõÄÐÅÏ¢¡£
¶ÑÕ»¸ú×Ù:
[NullReferenceException: 佫¶ÔÏóÒýÓÃÉèÖõ½¶ÔÏóµÄʵÀý¡£]
DZYHPGL._Default.btnLogin_Click(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\×ÀÃæ\Èí¼þ¹¤³Ì¿Î³ÌÉè¼Æ\µÍÖµÒ׺ÄÆ·¹ÜÀí£¨×îÖÕ£©\DZYHPGL\DZYHPGL\Login.aspx.cs:35
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
°æ±¾ÐÅÏ¢: Microsoft .NET Framework °æ±¾:2.0.50727.3603; ASP.NET °æ±¾:2.0.50727.3053
½â¾ö·½·¨£ºÊý¾Ý¿âÁ¬½Ó×Ö·û´®ÉèÖôíÎ󡣸տªÊ¼Êý¾Ý¿âÁ¬½Ó×Ö·û´®²ÉÓõÄÊÇWindowsµÇ½·½Ê½£¬ºó¸ÃΪÓû§ÃÜÂ뷽ʽ¡£Ôò³ÌÐòÕý³£ÔËÐС£
ÎÊÌâ2£º´ýÍøÕ¾ÔÚiisÖÖÕý³£·¢²¼ºó£¬ÔÚ±¾»úͨ¹ýIPµØÖ·¿ÉÒÔÕý³£·ÃÎÊ£¬¿ÉÊÇÔÚÐéÄâ»úÖÖ¾ÖÓòÍøÎÞ·¨Õý³£·¢ÎÊ£¿
½â¾ö·½·¨£ºÍ¨¹ýÉÏÍøÕÒ×ÊÁÏ£¬ÔÀ´ÊDZ¾»ú·À»ðǽµÄÔµ¹Ê£¬·À»ðǽ½ûÖ¹ÁË£¬Íâ½çͬ¹ýHttpÐÒé·ÃÎʱ±±¾»ú£¬Ö»ÒªÔÚ±¾»ú×öÈçÏÂÉèÖü´¿É£º
¿ØÖÆÃæ°å—°²È«ÖÐÐÄ—Windows·À»ðǽ—¸ß¼¶—Ñ¡ÖÐÍøÂçÁ¬½Ó£¬µã»÷ÉèÖã¬È»ºóÑ¡ÖГWeb·þÎñÆ÷£¨HTTP£©”£¬µã»÷È·¶¨¼´¿É¡£
Ïà¹ØÎĵµ£º
@Register : Register a user control or class with alias to this page.
@Import: Import a namespace.
@Reference: Link user controls or other page to complile current page. Ö§³ÖÊý¾Ý¿çÒ³ÃæµÄ´«ËÍ
Ò³Ãæʼþ£ºPreInit(´´½¨·þÎñÆ÷¿Ø¼þ), Init(³õʼ»¯·þÎñÆ÷¿Ø¼þµÄ״̬), InitComplete,PreLoad, Load, Lo ......
HttpHandlerʵÏÖÁËÀàËÆÓÚISAPI ExtentionµÄ¹¦ÄÜ£¬Ëû´¦ÀíÇëÇó(Request)µÄÐÅÏ¢ºÍ·¢ËÍÏìÓ¦(Response)¡£HttpHandler¹¦ÄܵÄʵÏÖͨ¹ýʵÏÖIHttpHandler½Ó¿ÚÀ´´ïµ½¡£¶øHttpModuleʵÏÖÁËÀàËÆÓÚISAPI FilterµÄ¹¦ÄÜ¡£
HttpModuleµÄʵÏÖ
HttpModulesʵÏÖÁËÀàËÆÓÚISAPI FilterµÄ¹¦ÄÜ£¬ÔÚ¿ª·¢ÉÏ£¬Í¨³£ÐèÒª¾¹ýÒÔϲ½Ö裺
±àдһ¸öÀà£¬Ê ......
ÔÚASP.NET 1.1ÖУ¬Òª×ö1¸öµ¯³öµÄÈ·È϶Ի°¿òµÄ»°£¬Ò»°ãÊÇÔÚ·þÎñ¶ËµÄ´úÂëÖÐÕâÑùд£º
private void Page_Load(object sender, System.EventArgs e)
{
btnClick.Attributes.Add("onclick", "return confirm('Are you sure?');");
// Button1.Attributes["OnClick"] = "return conf ......
Ò»¡¢ÓÃJQueryµÄAjax¼ÓÔØXML²¢½âÎöµÄ×¢ÒâÊÂÏî
1¡¢Content-Type
ºÜ¶àʱºòÎÞ·¨½âÎö¾ÍÊÇContent-TypeµÄÎÊÌâ¡£Èç¹û±¾Éí¾ÍÊÇXMLÎļþ£¬ÇëÌø¹ýÕâÒ»²½¡£
¶¯Ì¬Éú³ÉµÄXMLÒ»¶¨Òª½«ÆäÉèÖÃΪtext/xml£¬·ñÔòĬÈϾÍÊÇtext/htmlÒ²¾ÍÊÇÆÕͨµÄÎı¾¡£ ³£¼ûÓïÑÔµÄContent-TypeÉèÖãº
  ......
<a>±êÇ©
1. <a href=”test.aspx”></a>
2. ÕâÊÇ×î³£¼ûµÄÒ»ÖÖתÏò·½·¨;
HyperLink¿Ø¼þ
1. Asp.net ·þÎñÆ÷¶Ë¿Ø¼þ ÊôÐÔNaviga ......