The. NET Framework Framework
is a set of application development frameworks, the primary purpose of which is to provide a development model.
The main two components:
Common language Runtime (Common Language Runtime) (CLR):
Provides core services such as memory management, thread management, and remoting, and enforces stringent security types to improve code security and reliability.
. NET Framework Class Library:
Tightly integrated with the CLR, you can use it to develop multiple applications and services. Includes console applications, Windows Forms applications, Windowspresentationfoundation (WPF) applications (a class library and a set of APIs for creating systems to send messages between Web services and clients), ASP.net web sites , Web Services, Windows Services, WCF-oriented service applications and WF-enabled workflow applications, and so on.
ASP. NET is what?
Active Server Pages (dynamic server Pages, programs running in IIS)
ASP.net is a unified web development model that uses as few code as possible to generate the various services required for an enterprise-class ASP.net web site.
1, the perfect combination with the framework.
For the Framenwork framework, at the beginning has been explained.
2, asp.net is the compiler or the interpretation of the type?
is compiled: 1 asp.net web page is first accessed, will be compiled into the Microsoft intermediate Language (Microsoftintermediate (middle) language,msil). 2 The MSIL code will be compiled into machine language in Just-in-time (Just-in-time,jit) Form before the ASP.net page is actually executed.
IIS (Internet Information Services Information Service)
Provides an integrated, reliable Web Server feature that requires IIS support to run the ASP.net web site.
IIS (Internet Information Service) is a Web Web page service component, which is used for Web browsing, file transfer, news service and Mail sending, which makes it easy to publish information on the Internet.
In layman's terms:
IIS, is a Web server. Allows you to put HTML-formatted Web page files on a computer connected to a network for others to browse. Just like the Sina website, put all its files, put it on a computer connected to the network, set a default directory, we just enter Sina's Web site in the browser, you can visit.
HTM files and XHTML files
. htm is a static Web page file that contains no server controls and is made up of HTML elements. When a client browses to an. htm file, IIS can be sent directly to the browser and interpreted by the browser without any processing.
XHTML (extensible Hyper Text Markup Language) is used in place of the HTML language. It can be recognized by all browsers and is the basis of Web page generation. All dynamic Web page files containing asp.net elements are eventually converted to the appropriate XHTML to be recognized by the browser.
. aspx files
The. aspx file, which, as a fully object-oriented system, inherits System.Web.UI.Page classes directly or indirectly from the Web form.
Each Web form consists of two parts: a display interface code between <body> elements, including the interface definition information for XHTML elements and server controls. Other part: Include event handling C # code
. CSS files and CSS common sense
(sascading StyleSheet cascading style sheets, CSS)
Why use CSS?
XHTML can limit the display format of page elements in browsers, but it is not very controllable, if you want to unify the style of the site needs to be changed one after the other, inconvenient, so there is a CSS. CSS provides the ability to pinpoint and redefine XHTML element attributes on a xhtm basis, and a CSS style can be used on multiple pages, making it much easier to modify them. The
css Common sense
consists of a selector and a declaration two parts.
How do we apply CSS styles to our web pages?
There are three ways to choose (different locations):
1 inline styles, simply to use the HTML style attribute. This property can be applied to any BODY element.
2) Internal style, set in the Htmlstyle property.
3) An external style sheet that references a. CSS style sheet file
CSS style, which is raised in order of precedence.
is based on the element style. Redefine the HTML attribute.
p{margin-left:25px; margin-right:25px;} The
class-based style.
. intro{color: #ff0000;}
an ID based style.
#menubar {background-color: #008000;}
. js files and JavaScript common sense
JavaScript is an object-oriented and event-driven interpretive language developed by Netscape, which can be embedded directly into an HTML page as a scripting language without the need for Web server-side interpretation to implement Dynamic Web page processing by browsers. Almost or some browsers support Javascrip.
Javascrip Main uses:
Create dynamic text in XHTML.
Responds to client events.
You can read and change the contents of XHTML elements.
Validate the data before it is delivered to the server.
You can detect a visitor's browser and load related pages based on the type of browser you are detecting.
Used to create cookies.
Closes the window.
Displays the time on the page.
Code Location:
in
Effect:
When you execute <body>, the Load event is triggered and the message () function is invoked, and finally, it is displayed in the browser.
in the <body>
Code omitted.
in a standalone. js file.
A standalone JS file is used to invoke JavaScript in multiple pages, and the script file can be placed in a folder.
. XML files and XML common sense
Extensible Markup Language Extensible Markup Language
XML files are often used to solve the problem of exchanging data across platforms, a format that has become the standard format for Internet Data interchange. In contrast to XHTML, XHTML is designed to display data, and XML is used to transmit and store data.
Web.config file
A Web site's configuration file is an XML format file that stores configuration information, appears in multiple files, and forms a hierarchical relationship.
The top-level configuration file is Machine.config, has a default installation path, stores basic configuration information for the site, and usually does not need to be modified. The next layer is the web.config, and the next layer is the web.config of the subfolder, which is the inheritance relationship, the scope of which is in this folder as well as all of his subordinates.
C # Features:
1. C # code runs under the environment provided by the. NET framework, which does not allow direct manipulation of memory and enhances the security of the system.
2. C # does not recommend using pointers, and to use pointers, you must add unsafe modifiers and use/unsafe parameters at compile time.
3, the unified type System. All C # types inherit from a unique root type object.
4, use C # to build robust applications. C # Garbage collection automatically reclaims the memory occupied by objects that are no longer in use; exception handling; type-safe design avoids uninitialized variables and array indexes beyond bounds.
5, fully support component programming. Easy to create and use components of these software.
Framework Common Namespaces
System: Provides a basic class, such as a string class that provides strings manipulation.
System.Configuration: Provides the data class in the processing configuration file, such as the Connectionstringsettings class that can get the database connection string in the Web.config file.
System.Data: Provides access to the Ado.net class, such as our commonly used dataset class (which provides data caching).
System.ling: provides classes and interfaces for querying using LINQ.
System.Web: provides classes and interfaces that use browsers to communicate with servers, such as HttpRequest classes for reading clients.
System.Web.Security: Provides classes that implement ASP.net security on a Web server.
System.Web.UI: provides classes and interfaces for creating ASP.net Web site user interfaces, such as the page class for each Web form.
System.Web.UI.Htmlcontrols: Provides the creation of HTML server control classes on Web forms pages.
System.Web.UI.WebControls: Provides a Web server control class to be worn on a Web form.
SYSTEM.XML.LINQ: provides classes for LINQ to XML.
ASP. NET Standard controls
HTML server Control:
All HTML tags are instantiated so that the program can be directly controlled and the HTML control is made. In order to program the HTML control, we want to convert the XHTML control into an HTML server control, which in turn adds: runat= "Server" to the properties of the control. If it's just an HTML markup element, we do it in Web Form access, interpreted by the browser. For ASP.net to be better controlled, HTML controls and HTML server controls appear.
Web server control:
Unlike XHTML elements, you can describe the appearance, operation, and behavior of an element, and then the asp.net determines how to output the page.
After watching the days of the teacher's ASP.net control video, probably know that Web server controls can be divided into:
Standard controls: Commonly used controls, such as buttons, Drop-down boxes for text boxes, and calendars for the purpose class, in addition to forms (forms can also be viewed as special controls).
Data controls: Connecting to the database and displaying data in the data, and so on. Gridviewdatalist and so on.
Validation controls: Used to control the input of user information.
Navigation controls: for Web site navigation. TreeView menu and so on
Login control: For Web site user registration, user management and so on.
WebParts Control: Site Portal, custom user interface.
Ajaxextensions control: Used to update page-local information without commuting to the entire page.
User-defined controls: Extend system functionality to maintain some unified style of the site.
comparison:
HTML controls are less resource-intensive, but cannot interact with the background. If you want to interact, you will switch to HTML server controls. Web server controls need to be "translated" as HTML controls at compile time, and then sent to browsers to compare server resources.
Read the small compiled this article is not the basic knowledge of asp.net have a general understanding, like friends to collect it