Today's Thought

If men could regard the events of their own lives
with more open minds, they would frequently discover
that they did not really desire the things they failed to obtain

Thursday, August 18, 2011

The Single Page Model File

  • The page’s HTML markup and its programming code are in the same physical .aspx (extension) file.
  • The programming code is contained in a <script> block that specifies the attribute runat=“server”.
  • At run time, the compiler converts a single-file page into a class that derives from the System.Web.UI.Page.  
 Advantages of the single-file model include the following: 
  • In pages without a lot of code, keeping the programming code and the HTML markup in a single file proves to be very convenient while studying the file.
  • Pages written by using the single-file model are slightly easier to deploy or to send to another programmer because there is only one file.
  • A single-file page is easier to rename because there is no dependency between files.
  • Managing files in a source code control system is slightly easier because the page is self-contained in a single file.

      No comments:

      Post a Comment