菜单
  
    ASP.NET 2.0 Web Pages and Web Controls
    Until now, all of the example applications in this text have focused on console-based and Windows Forms front ends. In this chapter and the next, you’ll explore how the .NET platform facilitates the construction of browser-based presentation layers. To begin, you’ll quickly review a number of key web-centric concepts (HTTP, HTML, client-side, and server-side script) and the role of the web server (including the ASP.NET development server, WebDev.WebServer.exe).40168
    With this web primer out of the way, the remainder of this chapter concentrates on the composition of ASP.NET (including the enhanced code-behind model) and how to work with ASP.NET web controls. As you will see, ASP.NET 2.0 provides a number of new web controls, a new “master page”model, and various customization techniques.
    The Role of HTTP
    Web applications are very different animals from traditional desktop applications (to say the least).The first obvious difference is that a production-level web application will always involve at least two networked machines (of course, during development it is entirely possible to have a single machine play the role of both client and server). Given this fact, the machines in question must agree upon a particular wire protocol to determine how to send and receive data. The wire protocol that connects the computers in question is the Hypertext Transfer Protocol (HTTP).
    When a client machine launches a web browser (such as Netscape Navigator, Mozilla Firefox,or Microsoft Internet Explorer), an HTTP request is made to access a particular resource (such as an *.aspx or *.htm file) on the remote server machine. HTTP is a text-based protocol that is built upon a standard request/response paradigm. For example, if you navigate to www. IntertechTraining.com, the browser software leverages a web technology termed Domain Name Service (DNS) that converts the registered URL into a four-part, 32-bit numerical value (aka an IP address). At this point, the browser opens a socket connection (typically via port 80) and sends the HTTP request for the default page at the http://www.IntertechTraining.com website.
    Once the hosting web server receives the incoming HTTP request, the specified resource may contain logic that scrapes out any client-supplied input values (such as values within a text box) in order to format a proper HTTP response. Web programmers may leverage any number of technologies
    (CGI, ASP, ASP.NET, Java servlets, etc.) to dynamically generate the content to be emitted into the HTTP response. At this point, the client-side browser renders the HTML emitted from the web server.
    Another aspect of web development that is markedly different from traditional desktop programming is the fact that HTTP is an essentially stateless wire protocol. As soon as the web server emits a response to the client, everything about the previous interaction is forgotten. Therefore, as a web developer, it is up to you take specific steps to “remember” information (such as items in a shopping cart) about the clients who are currently logged on to your site. As you will see in the next chapter, ASP.NET provides numerous ways to handle state, many of which are commonplace to any web platform (session variables, cookies, and application variables) as well as some new techniques (view state, control state, and the cache).
    Understanding Web Applications and Web Servers
    A web application can be understood as a collection of files (*.htm, *.asp, *.aspx, image files, etc.) and related components (such as a .NET code library) stored within a particular set of directories on a given web server. As shown in Chapter 24, web applications have a specific life cycle and provide numerous events (such as initial startup or final shutdown) that you can hook into.
    A web server is a software product in charge of hosting your web applications, and it typically provides a number of related services such as integrated security, File Transfer Protocol (FTP) support, mail exchange services, and so forth. Internet Information Server (IIS) is Microsoft’s enterprise-level web server product, and as you would guess, it has intrinsic support for classic ASP as well as ASP.NET web applications.
  1. 上一篇:单桩海上风力发电机英文文献和中文翻译
  2. 下一篇:指纹识别英文文献和中文翻译
  1. ASP.NET技术先进的控件编程...

  2. Web2.0的网络广告模式英文文献和中文翻译

  3. 从经典ASP到ASP.NET英文文献和中文翻译

  4. Flash在网页设计中的应用英文文献和中文翻译

  5. 对C# 2.0和C# 3.0的新功能概...

  6. ASP.NET Web API的介绍英文文献和中文翻译

  7. ASP.NET技术英文文献及中文翻译

  8. 乳业同业并购式全产业链...

  9. 中考体育项目与体育教学合理结合的研究

  10. 电站锅炉暖风器设计任务书

  11. 当代大学生慈善意识研究+文献综述

  12. 十二层带中心支撑钢结构...

  13. 河岸冲刷和泥沙淤积的监测国内外研究现状

  14. 大众媒体对公共政策制定的影响

  15. 杂拟谷盗体内共生菌沃尔...

  16. 酸性水汽提装置总汽提塔设计+CAD图纸

  17. java+mysql车辆管理系统的设计+源代码

  

About

751论文网手机版...

主页:http://www.751com.cn

关闭返回