Dynamic Site (An Active Server Pages) : Madiha Kiran
Dynamic Site (An Active Server Pages) : Madiha Kiran
Madiha Kiran
1
DOT-NET is the technology
• .NET
• .NET is a free, cross-platform, open source developer platform for building
many different types of applications.
• The .NET is the technology from Microsoft, on which all other Microsoft
technologies will be depending on in future.
• It is a major technology change, introduced by Microsoft, to catch the
market from the SUN's Java.
2
DOT-NET is the technology
• Few years back, Microsoft had only VC++ and VB to compete with Java, but
Java was catching the market very fast.
• With the world depending more and more on the Internet/ Web
and java related tools becoming the best choice for the web applications,
Microsoft seemed to be loosing the battle.
3
.NET is also called Microsoft
strategy
• Microsoft introduced the .NET considering multiple factors.
• All unwanted complexities are eliminated
• and a pure object oriented programming model was introduced.
• This makes programmer's life very easy.
• .NET is said to be Microsoft development model in which software becomes
platform and device independent and data becomes available over the internet.
• Due to this vision Microsoft .NET is also called Microsoft strategy for connecting
systems, information and devices through web services so people can
collaborate and communicates effectively.
4
.NET
5
What is ASP.NET
• ASP.NET An Active Server Page (ASP)
• Microsoft ASP.NET is a framework used in web application development,
dynamic websites and web services.
• A framework for developing next generation websites, web applications and
web services.
• There have been 6 frameworks so far since this technology was created: 1.0,
1.1, 2.0, 3.5, 4.0 and the current version 4.5.
• Every framework has been adding more and more classes, methods, types,
etc., so programmers are able to do more things using these new features.
6
C sharp ( C#)
• C# is an object-oriented programming language developed by
Microsoft as part of the .NET framework.
• A C# web application will run on the Windows ecosystem and there is
a lot that can be leveraged for a powerful, seamless experience
7
integrated development
environment (IDE)
• An integrated development environment (IDE) is a software suite that consolidates
basic tools required to write and test software.
• Developers use numerous tools throughout software code creation, building and
testing. Development tools often include text editors, code libraries, compilers and
test platforms.
• Without an IDE, a developer must select, deploy, integrate and manage all of these
tools separately. An IDE brings many of those development-related tools together
as a single framework, application or service. The integrated toolset is designed to
simplify software development and can identify and minimize coding mistakes and
typos.
• Some IDEs are open source, while others are commercial offerings. An IDE can be a
standalone application or it can be part of a larger package.
8
Microsoft Visual Studio
• Microsoft Visual Studio is an integrated development environment
(IDE) from Microsoft.
• It is used to develop computer programs, as well as websites, web
apps, web services and mobile apps.
• Visual Studio uses Microsoft software development platforms such as
Windows API, Windows Forms, Windows Presentation Foundation,
Windows Store and Microsoft Silverlight. It can produce both native
code and managed code.
• It supports different programming languages like C#, as well as Visual
Basic, C, C++, and provides support for Python and Ruby
9
Overview
• Net is a framework and a class library
• ASP.net is a web application development platform, also called a
framework and class library for creating web apps.
• C# is language which can be used for developing applications.
• while Visual Studio is an IDE, which supports ASP.NET and C# and many
others
10
Web Development Technologies
Client-side technologies
HTML, DHTML, JavaScript
Server-side technologies
ASP (Active Server Pages)
11
Slide 6 of
What is ASP?
ASP page
(static HTML,
server-side logic)
13
Slide 8 of
Background
Demo: HelloWorld.asp
<html>
<head><title>HelloWorld.asp</title></head>
<body>
<form method=“post">
<input type="submit" id=button1 name=button1
value="Push Me" />
<%
if (Request.Form("button1") <> "") then
Response.Write("<p>Hello, the time is " & Now())
end if
%>
</form>
</body>
</html>
14
Slide 9 of
ASP Successes
VB C++ C# JScript …
Common Language Specification
Visual Studio.NET
ASP.NET: Web Services Windows
and Web Forms Forms
ADO.NET: Data and XML
Base Classes
Common Language Runtime
19
Slide 18 of
Approaches
Asp .Net supports three approaches to build web sites.
1. Web pages using web matrix
2. MVC
3. Web form
20
web matrix
• WebMatrix is a set of tools that provides an easy way to build Web sites
for Microsoft Windows.
• It includes
• a development web server: IIS Express (Internet Information Server )
• a web programming framework : ASP.NET
• an embedded database : SQL Server
21
MVC
22
MVC
• Model
The Model component corresponds to all the data-related logic that the user works with. This can
represent either the data that is being transferred between the View and Controller components or any
other business logic-related data. For example, a Customer object will retrieve the customer information
from the database, manipulate it and update it data back to the database or use it to render data.
• View
The View component is used for all the UI logic of the application. For example, the Customer view will
include all the UI components such as text boxes, dropdowns, etc. that the final user interacts with.
• Controller
Controllers act as an interface between Model and View components to process all the business logic
and incoming requests, manipulate data using the Model component and interact with the Views to
render the final output.
For example, the Customer controller will handle all the interactions and inputs from the Customer View
and update the database using the Customer Model. The same controller will be used to view the
Customer data.
23
MVC
24
Web form
25
ASP.NET Programming
Model
Controls and Events
Button code
Button ...
List code
List ...
Text code
Text ...
26
Slide 21 of
Programming
Model
ASP.NET Object Model
a descendant of System.Web.UI.Control
A page can have methods, properties, etc.
27
Slide 22 of
Programming
Model
Postbacks Maintain State
28
Slide 24 of
Programming
Model
Postbacks Maintain State
29
Slide 24 of
Programming
Model
Server-side Controls
3rd party
User-
defined
Controls range in complexity and power: button,
text, drop down, calendar, data grid, ad rotator,
validation
Can be populated via data binding
30
Slide 25 of
Programming
ModelBrowser Compatibility
Automatic
31
Slide 26 of
Programming Model
Automatic Browser
IE 4
Compatibility
Button
Menu
Text
Text
Menu Control Menu code
...
IE 5.5
Button
Text Control Text code
Menu
...
Text
IE 6
Button
... 32
Slide 27 of
Programming
Model
Code-behind pages
34
Slide 32 of
Programming
Basics
The Page Directive
36
Slide 34 of