Escolar Documentos
Profissional Documentos
Cultura Documentos
NET web
programming & IDE
BASIC OF ASP.NET
• Asp.net refers as Active Server Pages .net which is server side object oriented programming language.
• Asp.net is language of Microsoft.net framework to develop web applications.
• Benefits:-
o Easier OOP Language
o Quick Drag & Drop Control
o Code Separation
o Easier database operations
o Version Compatibility
o High Security
o Easy application Development
o Highly Integrated IDE
• Asp.net uses to develop dynamic web pages, web services and web application.
• Asp.net is built on the CLR(Common Language Runtime) that allows user to write Asp.net program
using any .net framework supported language like C#, VB, Visual C++, J# etc..
• Asp.net also supports ADO.NET (ActiveX data object.Net) that helps to connect and work with data
stored in database.
• Asp.net also provide everything Readymade such as Rich controls, Validation controls, Databound
controls, Ajax controls for developing easier, fast and highly dynamic web applications.
FEATURES OF ASP.NET *
• Simplified Programming Model: ASP.NET is a technology which can be implemented using any dotnet
language such as C#.Net or VB. Net
• Side by side Execution: Side by side execution is the ability to run multiple version of an application or
component on the same computer
• Server side Controls: ASP.NET technology has introduced rich powerful web server controls which are
capable to identify the clients’ browser and can render the HTML tags accordingly.
• Performance: Architecture of the ASP.NET is designed in order to increase the performance of the
application.
• Powerful Database Support: ASP.NET supports very large amount of database class and it also provide
the easy deployment of the connectivity with the application.
• Web Services: With the help of ASP.NET we can also develop the web services, which are useful for the
communication of protocols, it can be also used by other application, it is an application components.
• Simplified Form Validation: In other language we have to write so may line of codes to validate a
control, while in ASP.NET it becomes Easy and Simple for Deployment.
• Simplified Deployment: With the help of the CLR, We can develop our applications in any language so
we don’t have to worry about programming language. Visual Studio provides all the functionality of
drag of controls, we deployment becomes fast and easy. We can easily configure IIS (Internet Information
Service).
• Rich Tool Box Support: ASP.NET supports a very high range of tools which can be easily implemented.
1 Dept: CE AWT (3360706) Prof. Akash N. Siddhpura
Unit-1 Introduction to ASP.NET web
programming & IDE
JIT
Microsoft Intermediate
Compile
Language(MSIL)
r
CLR
101011100011010
Web Control
• ASP.NET Web server controls are objects on ASP.NET Web pages that run when the page is requested.
• Many Web server controls are similar to HTML elements, such as buttons and text boxes.
• Other controls have complex behavior, such as a calendar controls, and datacontrols that you can use
to connect to data sources and display data.
Web.Config
• Configuration file is used to manage various settings that define a website. The settings are stored in
XML files that are separate from your application code. Generally a website contains a single
Web.config file stored inside the application root directory.
• There are number of important settings that can be stored in the configuration file. Some of the most
frequently used configurations, stored inside Web.config file are: Database connections, Caching
settings, Session States, Error Handling, Security.
• Configuration file looks like this:
<configuration>
<connectionStrings>
<add name ="myCon" connectionString ="server= ANS-PC\SQLEXPRESS; database=Demo;”/>
</connectionStrings>
</configuration/>
Machine.config
• The machine.config file is the master configuration file on your system with a lot of default settings.
• The settings of Machine.config file are applied to the whole asp.net applications on your server.
• Each .NET Framework version has only one machine.config file.
• The machine.config would be to share values between many applications on the server.
Global.asax
• The Global.asax file, also known as the ASP.NET application file, is an optional file that contains code
for responding to application-level events raised by ASP.NET.
• Only one Global.asax file per application and it should be located in application’s root directory only.
• Application-level events are: Application_Start, Application_End, Session_Start, Session_End.
Business Layer
• A Business Layer contains business logic, validations or calculations related to the data.
• Though a web site could talk to the data access layer directly, it usually goes through another layer
called the Business Layer. The Business Layer validates the input conditions before calling a method
from the data layer. This ensures the data input is correct before proceeding, and can often ensure
that the outputs are correct as well. This validation of input is called business rules, meaning the rules
that the Business Layer uses to make “judgments” about the data.
Data Layer
• A Data Layer contains methods that help the Business Layer to connect the data and perform required
actions, whether to return data or to manipulate data (insert, update, delete and so on).
DIFFERENCE BETWEEN 2-TIER & 3-TIER ARCHITECTURE:
2-Tier Architecture 3-Tier Architecture
It has 2 layers one is database layer & another is It has 3 layers, one is database layer, second is logic layer
presentation layer and third is presentation layer
Less Secure compare to 3-Tier Architecture Secure compare to 2-Tier Architecture
Performance is poor because here task of logic layer and Performance is good as there are 3 tiers
database layer will be done by only database layer
Only one database can be used Here we can use multiple database also
Less Reusability Better Reusability
Tuff task to maintain Easy to maintain
(https://www.tuturself.com/posts/view?menuId=90&po (https://www.tuturself.com/posts/view?menuId=90&postId
stId=465) =465)
• Toolbox: The Toolbox window contains controls used to customize forms. Programmers can “drag and
drop” controls onto the form.
• Properties: The Properties window displays the properties for a form or control. Properties specify
information such as size, color and position.
• Solution Explorer: The solution explorer window provides access to all the files in the solution.
Set up of work environment, Start page, the menu system, toolbars, the new project dialog
box, graphical designer, code designer
• The new project window allows choosing an application template from the available templates.
• When you start a new web site, ASP.NET provides the starting folders and files for the site, including
two files for the first web form of the site.
• The file named Default.aspx contains the HTML and asp code that defines the form, and the file named
Default.aspx.cs (for C# coding) or the file named Default.aspx.vb (for vb coding) contains the code in
the language you have chosen and this code is responsible for the form's works.
• The primary window in the Visual Studio IDE is the Web Forms Designer window. Other supporting
windows are the Toolbox, the Solution Explorer, and the Properties window.
• You use the designer to design a web form, to add code to the control on the form so that the form
works according to your need, you use the code editor.
• To add a standard folder, right-click on the project or folder under which you are going to add the
folder in the Solution Explorer and choose New Folder.
• To add an ASP.Net folder, right-click on the project in the Solution Explorer and select the folder from
the list.
• To add an existing item to the site, right-click on the project or folder under which you are going to add
the item in the Solution Explorer and select from the dialog box.
Page
request
Unload Start
Rendering Initialization
Load