ASP.NET Introduction

What is ASP.NET: 

A Microsoft server-side web technology. ASP.NET takes an object-oriented programming approach to web page execution. Every element in an ASP.NET page is treated as an object and run the server. An ASP.NET page gets compiled into an intermediate language by a .NET common language runtime-compliant compiler.

 

Asp.Net is used to create web pages and web services and is an integral part of Microsoft’s .net vision.

 

Asp.net language supports is 

1)ASP.NET uses ADO.NET 

2)ASP.NET supports full visual basic, not VBScript 

3)ASP.NET supports C#(C sharp) and C++ 

4)ASP.NET supports Java Script

 

Working with Visual Studio: 

Start->run->devenv 

It will display main window of visual studio 

File menu->new->website->visual c#->select Asp.Net empty website 

Weblocation->e:\aspnet\demosite[drive:\dir\websitename] 

Visual studio create a folder with website name, in this folder website related files will be placed.

 

Creating asp.net webpage into demosite: 

Goto view menu and select solution explorer 

Right click on website path [e:\aspnet\demosite] 

Goto->And select add new item. 

Select webform template 

Name given to –default.aspx

 

Click on Add button

Place server side code below body tag 

<body> 

<h1> 

<% 

      Response.Write(“Asp.Net page using VS”); 

 %> 

</h1> 

</body>

 

Goto  Contrl  F5

 

[it will activate browser name to display webpage output]

 

Weblocations supported by visualstudio: 

Weblocation will specify storage location of website. Visualstudio is providing 3 weblocations

 

1)File system 

2)HTTP 

3)FTP

 

File system:

Website will be managed by asp.net development server. Asp.net development server comes with visualstudio, Asp.net development server can be called as “cussini webserver”.

 

Advantages: 

1)IIS is not requires 

2)asp.net will be configured implicitly

 

Dis advantages: 

1)web pages are not accessible with in network 

2)it doesn’t support advanced concepts like security, Webservices

 

HTTP: 

Website will be managed by webserver IIS 

 

Advantages: 

1)webpages are accessible with in network 

2)it supports all the advanced concepts like security, web services

 

Disadvantages: 

1)IIS installation is required 

2)Asp.net to be configured properly

 

FTP[file transfer protocol] 

This allows creating website in one system and storing into another system

Webform structure: 

1)webform is template provided by visualstudio to create asp.net webpage. 

2)The feature of webform template is “what you see is what you get” means webpage presented at the creation will be shown at the time of running webpage with browser.

 

Webform template will provide 3 views 

1)design view 

2)source view 

3)code view (or) logic view 

 

Design view: 

This allows developer to arrange user interfaces[controls] on webform

 

Source view: 

This allows developer to view (or) to place markup content into webform

 

Code view (or)logic view 

This allows developer to place logic part into webform, This comes in the form of CS file 

 

Webserver controls:

1)client side controls are accessible only with in client side scripting 

2)webserver controls are accessible with in server side programming, This makes asp.net developer job easier 

3)asp.net is providing set of controls to provides user interaction with asp.net webpage, This controls are called “webserver controls” 

4)web server controls are called “smart controls”[behavior of web server controls will be based on browser type and browser settings. This is called smart behavior]

 

Web Server controls can be categorized into following things 

1)Standard controls 

EX: Label,textbox,button…

 

2)Data controls 

EX: gridview,Datalist…

 

3)Validation controls 

EX: Required field validator......

 

4)Navigation controls 

EX: tree view,menu…....