Sideway
output.to from Sideway
Draft for Information Only

Content

What is ASP.NET?
  Examples
 ASP.Net Technology
 ASP.NET Document
  Examples
 Difference between ASP.NET and ASP
 ASP.NET Element
  Examples
 ASP.NET Mechanism
 ASP.NET Additional Information

What is ASP.NET?

ASP.NET is .........

  • ASP stands for Active Server Pages
  • ASP.NET is a server side technology that built on the .NET technology from Microsoft.com
  • ASP.NET files use the extension ".aspx" to activate the supported web server to compile the ASP.NET files
  • ASP.NET also uses delimiters "<%" and "%>" as markup tags to specify the beginning and end of the enclosed script commands.
  • ASP.NET also supports Embedded code blocks in web pages for providing backward compatibility with ASP technology.

Examples

Examples of ASP.NET code
ASP.NET Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    </head>
    <body>
<%Response.Write("<p>Results on "& Request.ServerVariables("SERVER_SOFTWARE") & " .net: " & System.Environment.Version.ToString & " " & ScriptEngine & " Version " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "</p>")%>
<% Response.Write ("<h1>This is a Sample ASP.NET Code</h1>") %>
    </body>
</html>
Translated HTML Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    </head>
    <body>
<p>Results on Microsoft-IIS/8.5 .net: 4.0.30319.42000 VB Version 14.0</p><h1>This is a Sample ASP.NET Code</h1>
    </body>
</html>
HTML Web Page Embedded Output:

ASP.Net Technology

Unlike ASP technolgy, ASP.NET compile the ASP.NET document and return a HTTP document. In other words, ASP.NET technology adds an abstraction layer on top of HTTP to handle ASP.NET files and the web server becomes operating in a two-tiered way.

image

ASP.NET Document

Basic Features of ASP.NET files.........

  • ASP.NET file is a HTML script with extension ".aspx" to describe web page
  • ASP.NET file is just a HTML script containing ASP.NET scripts.
  • ASP.NET technology is just an additional script compiling engine to compile the ASP.NET file and return a HTML document.
  • HTML document contains HTML tags and plain text without script command can also be an ASP.NET file by renaming the extension to ".aspx"
  • ASP.NET technology also enables both ActiveX scripts and ActiveX server components running on the server through the .NET technology.

Examples

Examples of ASP.NET page
ASP.NET Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    </head>
    <body>
<%Response.Write("<p>Results on "& Request.ServerVariables("SERVER_SOFTWARE") & " .net: " & System.Environment.Version.ToString & " " & ScriptEngine & " Version " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "</p>")%>
        <% Response.Write ("<h1>This is a Sample ASP.NET Page</h1>") %>
    </body>
</html>
Translated HTML Code Input:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Sample Page</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    </head>
    <body>
<p>Results on Microsoft-IIS/8.5 .net: 4.0.30319.42000 VB Version 14.0</p><h1>This is a Sample ASP.NET Page</h1>
    </body>
</html>
HTML Web Page Embedded Output:

Difference between ASP.NET and ASP

The key differences are

  • ASP.NET is based on a newer technology, the .NET technology, while ASP is based on the ActiveX technology.
  • ASP.NET is designed to manipulate the elements of a document tree in addition to the document itself, while ASP is desinged to manipulate the document as a whole.
  • Through the manipulate the elements of a document, the control code of ASP.NET can be easily seperated from the document tree as an individed block.

ASP.NET Element

In general, the elements of an ASP.NET document can be grouped into:

  • Directive block: settings for the ASP.NET engine to process ASP.NET document.<%@ Page Language="VB" %>
  • Script
    • Script declaration block: application logic of ASP.NET document <script runat="server"> Sub Page_Load() lbl01.Text="Hello World"End Sub </script>
    • Inline script render block: inline code and expressions of ASP.NET document.<%lbl01a.Controls.Add(New LiteralControl(("<h1>This is a Sample ASP.NET Page</h1>")))%>
    • Inline ASP.NET server control: the dynamic elements of ASP.NET document. These elements are used as ASP.NET bookmarks in the ASP.NET document and can be ASP.NET controls, HTML controls, and web user controls. <asp:label id="lbl01" runat="server" />
  • Server-side comments: page comments or notes that will not be processed by ASP.NET engine.<%-- Set on Page_Load --%>
  • Litereral text and HTML tags: other HTML elements of ASP.NET document.

Examples

Examples of ASP.NET page
ASP.NET Code Input:
<%@ Page Language="VB" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
       <title>Sample Page</title>
       <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
       <script runat="server">
           Sub Page_Load()
               lbl01.Text="Hello World"
           End Sub
       </script>
    </head>
    <body>
<%Response.Write("<p>Results on "& Request.ServerVariables("SERVER_SOFTWARE") & " .net: " & System.Environment.Version.ToString & " " & ScriptEngine & " Version " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "</p>")%>
       <p>
           <%-- Set on Page_Load --%>
           <asp:Label id="lbl01" runat="server" />
       </p>
       <% Response.Write ("<h1>This is a Sample ASP.NET Page</h1>") %>
    </body>
</html>
Translated HTML Code Input:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
       <title>Sample Page</title>
       <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    </head>
    <body>
<p>Results on Microsoft-IIS/8.5 .net: 4.0.30319.42000 VB Version 14.0</p>
       <p>
               <span id="lbl01">Hello World</span>
       </p>
       <h1>This is a Sample ASP.NET Page</h1>
    </body>
</html>
HTML Web Page Embedded Output:

ASP.NET Mechanism

In general, the mechanism of ASP.NET engine in the IIS is similar to use a ASP.NET compliler to generate a HTML document. As ASP.NET supports server side include, IIS web server will first insert the content of the included file into the ASP.NET file before processing. Since ASP.NET is built on the .NET technology, a set of needed namespaces is automatically imported for all ASP.NET web pages with .aspx file extension.

  • System
  • System.Collections
  • System.Collections.Specialized
  • System.Configuration
  • System.Text
  • System.Text.RegularExpressions
  • System.Web
  • System.Web.Caching
  • System.Web.Profile
  • System.Web.Security
  • System.Web.SessionState
  • System.Web.UI
  • System.Web.UI.HtmlControls
  • System.Web.UI.WebControls
  • System.Web.UI.WebControls.WebParts

ASP.NET Additional Information

ASP.NET additional information ..........

  • https://docs.microsoft.com/en-us/aspnet/#pivot=aspnet (last updated on 17Mar2018)

©sideway

ID: 180900010 Last Updated: 9/10/2018 Revision: 1 Ref:

close

References

  1. Active Server Pages,  , http://msdn.microsoft.com/en-us/library/aa286483.aspx
  2. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929%28v=vs.90%29.aspx
  3. ASP Best Practices,  , http://technet.microsoft.com/en-us/library/cc939157.aspx
  4. ASP Built-in Objects,  , http://msdn.microsoft.com/en-us/library/ie/ms524716(v=vs.90).aspx
  5. Response Object,  , http://msdn.microsoft.com/en-us/library/ms525405(v=vs.90).aspx
  6. Request Object,  , http://msdn.microsoft.com/en-us/library/ms524948(v=vs.90).aspx
  7. Server Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525541(v=vs.90).aspx
  8. Application Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525360(v=vs.90).aspx
  9. Session Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms524319(8v=vs.90).aspx
  10. ASPError Object,  , http://msdn.microsoft.com/en-us/library/ms524942(v=vs.90).aspx
  11. ObjectContext Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525667(v=vs.90).aspx
  12. Debugging Global.asa Files,  , http://msdn.microsoft.com/en-us/library/aa291249(v=vs.71).aspx
  13. How to: Debug Global.asa files,  , http://msdn.microsoft.com/en-us/library/ms241868(v=vs.80).aspx
  14. Calling COM Components from ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524620(v=VS.90).aspx
  15. IIS ASP Scripting Reference,  , http://msdn.microsoft.com/en-us/library/ms524664(v=vs.90).aspx
  16. ASP Keywords,  , http://msdn.microsoft.com/en-us/library/ms524672(v=vs.90).aspx
  17. Creating Simple ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524741(v=vs.90).aspx
  18. Including Files in ASP Applications,  , http://msdn.microsoft.com/en-us/library/ms524876(v=vs.90).aspx
  19. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929(v=vs.90).aspx
  20. FileSystemObject Object,  , http://msdn.microsoft.com/en-us/library/z9ty6h50(v=vs.84).aspx
  21. http://msdn.microsoft.com/en-us/library/windows/desktop/ms675944(v=vs.85).aspx,  , ADO Object Model
  22. ADO Fundamentals,  , http://msdn.microsoft.com/en-us/library/windows/desktop/ms680928(v=vs.85).aspx
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019