Page 215 - DCAP408_WEB_PROGRAMMING
P. 215

Unit 8: ASP Web Forms




          Self Assessment                                                                       Notes

          Fill in the blanks:
          10.  A client computer requests some needed information from a …………………… computer.
          11.  …………………… is programmatic code in an HTML file that runs on the browser.

          12.  The client does not receive any code from server side scripts rather the client receives just
               the output of the ……………………

          8.4 Building and Processing Web Forms


          Understanding how Web Forms are Processed

          A Web form is another name for an ASP.NET page. A Web form can be made up of a single file
          with an .aspx extension. An .aspx file and a code behind file can be combined to make a Web
          form. As we’ll show in the following few days, Web forms can also contain your own custom
          controls, defined similarly to .aspx pages, called user controls.
          Because a Web form can include HTML, ASP.NET Web controls, custom (user) controls, and code
          behind, creating them can get complicated pretty quickly. However, we need to remember only
          a few key ideas about ASP.NET page processing so that we can develop and debug effectively.
          The first key idea is that much of ASP.NET infrastructure is set up so that a single ASP.NET page
          can post form data back to itself repeatedly. This technique is most useful when we divide our
          Web site’s functionality into a few main pages.


























          The second key idea to remember is that all ASP.NET  pages are eventually compiled into
          executable files by the ASP.NET infrastructure. This means that every time a page is processed
          and rendered, a small program corresponding to each Web form is executed by the ASP.NET
          infrastructure.

          Let’s explore in more detail how Web forms are processed. Listing shows a sample Web form
          that performs an English unit to metric unit conversion, and this is shown below.








                                           LOVELY PROFESSIONAL UNIVERSITY                                   209
   210   211   212   213   214   215   216   217   218   219   220