- 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