Basics of Microsoft ASP.NET


Basics of Microsoft ASP.NET

Microsoft ASP.NET is a Microsoft developed an application framework to create server-side web applications and web services on the .NET platform. 

Introduced along with .NET framework 1.0 in 2002, Microsoft ASP.NET is an upgraded version of another Microsoft technology called Active Server Page (ASP).
 

Basics of ASP.NET

What are the technologies supported by ASP.NET for back-end coding?
We can use C#, F# and Visual Basic languages for back-end coding for ASP.NET.

Types of projects supported by ASP.NET?

The list of project types supported by ASP.NET are: 
1 ASP.NET Web Applications 
2. ASP.NET MVC application 
3. ASP.NET Core application 
4. ASP.NET Webservices 
5. ASP.NET Web API
 
Is ASP.NET is a server-side Programming?
The answer is ‘yes’. ASP.NET code is executed on server-side i.e. all page requests from browser processed on the server rather than client(browser).

What are the basic technologies required to build an ASP.NET web site?
To build an ASP.NET website, required the combination of the following technologies.

1. ASP.NET Web Application or website template from Visual Studio 
2. C# or VB for back-end coding 
3. ASP.NET server-side controls (or) HTML controls 
4. CSS 
5. Javascript 

What is the development environment required for ASP.NET applications?
The Microsoft Visual Studio is the primary development environment for ASP.NET applications.

What is the latest ASP.NET framework version available?
The latest stable version of ASP.NET framework version is 4.8.

Steps to create the ASP.NET website:

Steps to create the ASP.NET website: 
Step 1: Open the Visual Studio (any latest version like VS2019, VS2017 if possible) 
Step 2: Click on File from the top menu 
Step 3: Click on Project from the file options 
Step 4: Select the language C# or VB and ASP.NET web application template from the list of project templates 
Step 5: Select the name of the web application, click on Create or OK button as per the VS version 
Step 6: Select the ASP.NET project template as per the need

1. WebForms for website or web application creation 
2. MVC for web application with MVC pattern 
3. Web API for restful Http services Select web forms for web applications. 

Click on Create or OK button. 
Now Visual Studio ready for application development.

Project structure for ASP.NET:       

         What is the default project structure for the ASP.NET web application?
In Visual Studio 2019 or 2017 below is the default project structure.
App_start folder:
Contains application URL configurations 

Content folder:
Contains default .css files for layout changes 

Fonts:
Contains default fonts supported 

Scripts:
Contains default .js (javascript) files for any scripting 

Default.aspx :
default webpage 

Default.aspx.cs:
default coding behind file for the webpage
Note: The file extension for asp.net pages are .aspx and .aspx.cs 

Global.asax :
application extension file contains application and session-level events 

Site.Master:
Common page template for all web pages 

Web.config :
Contains complete configuration for website or application

How to set the default webpage and project in the ASP.NET website or web application?
Before running the ASP.NET website or web application, we can set the default web page and default project.
Step1:
Open the Solution in Visual Studio 2019 or 2017.
Step2:
In the Solution Explorer,  if you have more than one project in the solution, select the project you want to make it as default, right-click on that project and select the 'Set as Startup Project' option.
Step3:
Once the default project selected, choose the page you want to make it as a default page, right-click on that file and select the 'Set as Start Page' option.

How to run the ASP.NET website or web application? 
Once coding completed, Navigate to Build -> Build Application option from the menu or press F6 to compile the application.
Once compiled successfully, Press F5( run the application with debugging option) or CTRL+F5 (run the app without debugging option)

Conclusion

If no errors found while F5,  we can see the default web page opened in the default web browser (IE/ Chrome/Mozilla/Opera, etc.). With ASP.NET in-built features and supported technologies we can build some powerful and beautiful websites.


No comments:

Post a Comment