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

ASP.NET application and page life cycle 2

http://www.codeproject.com/KB/aspnet/ASPDOTNETPageLifecycle.aspx?msg=3443071#xx3443071xx
ASP.NET application and page life cycle
Introduction
The Two step process
Creation of ASP.NET environment
Process request using MHPM events fired
In What event we should do what?
A sample code for demonstration
Zooming ASP.NET page events
Source code
References
 
Introduction
 
In this article we will try to understand what are the different events which takes place right from the time the user sends a request, until the time request is rendered on the browser. So we will first try to understand the two broader steps of an ASP.NET request and then we will move in to different events emitted from ‘HttpHandler’, ‘HttpModule’ and ASP.NET page object. As we move in this event journey we will try to understand what kind of logic should go in each every of these events.
This is a small Ebook for all my .NET friends which covers topics like WCF,WPF,WWF,Ajax,Core .NET,SQL etc you can download the same from Click here  or else you can catch me on my daily free training @ Click here 
 
The Two step process
 
from 30,000 feet level ASP.NET request processing is a 2 step process as shown below. User sends a request to the IIS:-
• ASP.NET creates an environment which can process the request. In other words it creates the application object, request, response and context objects to process the request.
• Once the environment is created the request is processed through series of events which is processed by using modules, handlers and page objects. To keep it short lets name this step as MHPM (Module, handler, page and Module event), we will come to details later.
 
In the coming sections we will understand both these main steps in more details.
 
Creation of ASP.NET environment
 
Step 1:- The user sends a request to IIS. IIS first checks which ISAPI extension can serve this request. De


Ïà¹ØÎĵµ£º

asp.netµÄpostback»úÖÆ£º__doPostBack

__doPostBack
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
function __doPostBack(eventTarget, eventArgument)
{
           if (!t ......

asp.net ʵÏÖexcelµ¼Èëµ½Êý¾Ý¿â

//ExcelÅúÁ¿µ¼Èëµ½Êý¾Ý¿â
      protected void btnUpload_Click(object sender, EventArgs e)
      {   
         string IsXls = System.IO.Path.GetExtension(UploadExcel.FileName.ToString().ToLower ......

asp.net ÖеÄcache

.netÖкÎÓÐЧµÄʹÓÃCache
Cache ¼´¸ßËÙ»º´æ £¬ÄÇôcacheÊÇÈçºÎÌá¸ßϵͳÐÔÄÜÓëÔËÐÐËÙ¶ÈÄØ£¿ÊDz»ÊÇÔÚÈκÎÇé¿öÏÂÓÃcache¶¼ÄÜÌá¸ßÐÔÄÜ£¿ÊDz»ÊÇcacheÓõÄÔ½¶à¾ÍÔ½ºÃÄØ£¿ÏÂÃæÊÇ×ܽ᣺ 
1.       Cache ÊÇÈçºÎ¹¤×÷µÄ   l         Cache ÊÇ·ÖÅ ......

ASP.NET¿çÒ³Ãæ´«Öµ¼¼ÇÉ

ASP.NET¿çÒ³Ãæ´«Öµ¼¼ÇÉ×Ü½á ¹ØÓÚÒ³Ãæ´«ÖµµÄ·½·¨£¬Òý·¢Á˺ܶàÌÖÂÛ¡£¿´À´ÓкܶàÈ˹Ø×¢Õâ¸ö£¬ÎÒ¾ÍÎÒ¸öÈ˹۵ã×öÁËЩ×ܽᣬϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
1.  Ê¹ÓÃQueryString±äÁ¿
QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṹ¼òµ¥µÄÊýֵʱ ......

ÈÏʶASP.NETÅäÖÃÎļþWeb.config

Ò»¡¢ÈÏʶWeb.configÎļþ
Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄ
Web.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ