Beruflich Dokumente
Kultur Dokumente
NET
Pre-Assessment Questions
1. In .NET, codes are compiled into ________.
a. ByteCode
b. Microsoft International Language
c. BitCode
d. Microsoft Intermediate Language
a. Overloading
b. Overriding
c. Inheritance
d. Structured programming
Objectives
In this lesson, you will learn to:
Understanding ASP.NET
• ASP.NET is a standard HTML file that contains embedded server-side scripts.
• ASP.NET provides the following advantages of server-side scripting:
• Enables to access information from data sources that are stored on a Web
server or a computer that is accessible to a Web server
• Enables to use a set of programming code called templates to create HTML
documents
• Enables to separate HTML design from the data retrieval mechanism
Features of ASP.NET
• The features of ASP.NET are as follows:
• Compiled Code
• Enriched Tool Support
• Power and Flexibility
• Simplicity
• Manageability
• Scalability
• Security
• Extensibility
• Web Forms
• Web Services
Namespace Description
System Contains classes for implementing base data
types. In addition, it contains classes for working
with date and time.
System.Collections Contains classes for working with standard
collection types, such as hash tables and array
lists.
System.ComponentModel Contains classes for implementing both design-
time and run-time behaviors of components and
controls.
System.Data Contains classes for implementing the ADO.NET
architecture.
©NIIT Developing Web Applications Using ASP.NET Lesson 1A / Slide 24 of 40
Introducing ASP.NET
Page Events
• ASP.NET uses an event-driven model of programming. The following table
lists some of these events:
Object Description
Application Provides methods and properties to access information
related to the entire Web application. Information is
stored in either variables or objects.
Request Provides methods, properties, and collections to access
the information about the client requesting the page.
Response Provides methods, properties, and collections to access
information related to the response generated by the
server.
Server Provides methods and properties to access information
related to the server.
Session Provides methods, properties, and collections to access
information related to the user’s session.
©NIIT Developing Web Applications Using ASP.NET Lesson 1A / Slide 27 of 40
Introducing ASP.NET
• Directives
• Code declaration blocks
• Code render blocks
• Server-side comments
• Server-side Include directives
Summary
In this lesson, you learned that:
• A Web application can have client-side scripting, server-side scripting, or both.
• ASP.NET, the .NET version of ASP, is built on Microsoft .NET Framework. After
creating an ASP.NET application, the ASP.NET files need to be stored on the IIS
server.
• The features of ASP.NET are:
• Compiled Code
• Enriched Tool Support
• Power and Flexibility
• Simplicity
• Manageability
• Scalability
• Security
• Customizability
• Extensibility
Summary (Contd.)
• ASP.NET provides two types of programming models:
• Web Forms
• Web Services
• Web Forms enable you to create form-based dynamic Web pages.
• A Web Service is defined as a program unit that can be accessed by other
applications through the Internet.
• The following are the files that get generated when you create an ASP.NET
application:
• AssemblyInfo.cs
• Global.asax
• Web.config
• WebApplication.vsdisco
• WebForm1.aspx
Summary (Contd.)
• Web forms have two views:
• Design view
• HTML view
• The code-behind feature of ASP.NET enables you to divide an ASP.NET page into
two files:
• The presentation file that stores the user interface contents.
• The code-behind file that stores the application logic.
• The sequence of events that are fired during the life cycle of a Web page are:
• Init
• Load
• Unload
Summary (Contd.)
• Some of the built-in intrinsic objects are:
• Application
• Request
• Response
• Server
• Session
• The structure of an ASP.NET page includes:
• Directives
• Code declaration blocks
• Code render blocks
• Server-side comments
• Server-side Include directives
• A style sheet is a document, which defines a group of styles.
Summary (Contd.)
• The three ways to add a style sheet to a Web page are:
• Using an inline style sheet
• Using an embedded style sheet
• Using an external (linked) style sheet